Bonjour à tous.
J'ai un programme de sauvegarde sous Linux qui sauvegarde le contenu d'un dossier dans une archive tar.
La commande qu'il lance (via un system()) est la suivante:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
tar --acls --xattrs  -cvf compressed.tar /folder_to_compress
Mon souci est que je n'ai pas de retour d'infos pour afficher une progressbar ou même exclure dynamiquement des fichiers/dossiers de la sauvegarde.
Du coup je commence à chercher la lib qui va bien pour compresser du tar et je trouve "libarchive".
Mon souci est que je ne trouve pas d'infos sur la gestion des acls et attributs étendus ntfs.
Je pense avoir trouvé une piste dans les fichiers d'entête mais je sens que je vais galérer pour mettre ça en application vu le manque de documentation...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Set the ACL by clearing it and adding entries one at a time.
 * Unlike the POSIX.1e ACL routines, you must specify the type
 * (access/default) for each entry.  Internally, the ACL data is just
 * a soup of entries.  API calls here allow you to retrieve just the
 * entries of interest.  This design (which goes against the spirit of
 * POSIX.1e) is useful for handling archive formats that combine
 * default and access information in a single ACL list.
 */
__LA_DECL void	 archive_entry_acl_clear(struct archive_entry *);
__LA_DECL int	 archive_entry_acl_add_entry(struct archive_entry *,
	    int /* type */, int /* permset */, int /* tag */,
	    int /* qual */, const char * /* name */);
__LA_DECL int	 archive_entry_acl_add_entry_w(struct archive_entry *,
	    int /* type */, int /* permset */, int /* tag */,
	    int /* qual */, const wchar_t * /* name */);
 
/*
 * To retrieve the ACL, first "reset", then repeatedly ask for the
 * "next" entry.  The want_type parameter allows you to request only
 * certain types of entries.
 */
__LA_DECL int	 archive_entry_acl_reset(struct archive_entry *, int /* want_type */);
__LA_DECL int	 archive_entry_acl_next(struct archive_entry *, int /* want_type */,
	    int * /* type */, int * /* permset */, int * /* tag */,
	    int * /* qual */, const char ** /* name */);
__LA_DECL int	 archive_entry_acl_next_w(struct archive_entry *, int /* want_type */,
	    int * /* type */, int * /* permset */, int * /* tag */,
	    int * /* qual */, const wchar_t ** /* name */);
Si quelqu'un a déjà planché là dessus, je lui serais reconnaissant de m'aider à comprendre.
Merci.