![]() |
![]() |
![]() |
Libfm Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#define FM_DEEP_COUNT_JOB_TYPE struct FmDeepCountJob; struct FmDeepCountJobClass; enum FmDeepCountJobFlags; FmDeepCountJob * fm_deep_count_job_new (FmPathList *paths
,FmDeepCountJobFlags flags
); void fm_deep_count_job_set_dest (FmDeepCountJob *dc
,dev_t dev
,const char *fs_id
);
include
: libfm/fm-deep-count-job.h
The FmDeepCountJob can be used to recursively gather information about some files and directories content before copy or move. It counts total size of all given files and directories, and size on disk for them. If flags for the job include FM_DC_JOB_PREPARE_MOVE then also count of files to move between volumes will be counted as well.
struct FmDeepCountJob { FmJob parent; FmPathList* paths; FmDeepCountJobFlags flags; goffset total_size; goffset total_ondisk_size; guint count; };
FmJob |
the parent object |
FmPathList * |
list of paths to count |
FmDeepCountJobFlags |
flags for counting |
counted total file size | |
counted total file size on disk | |
number of files to be moved between devices |
typedef enum { FM_DC_JOB_DEFAULT = 0, FM_DC_JOB_FOLLOW_LINKS = 1<<0, FM_DC_JOB_SAME_FS = 1<<1, FM_DC_JOB_PREPARE_MOVE = 1<<2, FM_DC_JOB_PREPARE_DELETE = 1 <<3 } FmDeepCountJobFlags;
do deep count for all files/folders | |
don't follow symlinks | |
only do deep count for files on the same devices. what's the use case of this? | |
special handling for moving files. only do deep count for files on different devices | |
special handling for deleting files |
FmDeepCountJob * fm_deep_count_job_new (FmPathList *paths
,FmDeepCountJobFlags flags
);
Creates a new FmDeepCountJob which can be ran via FmJob API.
|
list of files and directories to count sizes |
|
flags of the counting behavior |
Returns : |
a new FmDeepCountJob object. [transfer full] |
Since 0.1.0
void fm_deep_count_job_set_dest (FmDeepCountJob *dc
,dev_t dev
,const char *fs_id
);
Sets destination for the job dc
that will be used when the job is
ran with any of flags FM_DC_JOB_SAME_FS or FM_DC_JOB_PREPARE_MOVE.
If dev
is 0 (and fs_id
is NULL) then destination device is non on
native filesystem.
|
a job to set the destination |
|
UNIX device ID |
|
filesystem id in gio format. [allow-none] |
Since 0.1.0