dir_info_new
Creates a new directory information.
struct dir_info * dir_info_new ( void);
This function creates a new directory information. It's an allocation function.
Result: a pointer to the directory information structure. Returns NULL when an error occured. .
dir_info_set_sub_folder
Sets the directory's number of subfolders.
gint dir_info_set_sub_folder ( struct dir_info *p, gint nb);
This function sets the number of subfolders which are in directory.
Parameters
p | the directory information to set the number of subfolders |
nb | the number of subfolders |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
dir_info_set_size
Sets the directory's size.
gint dir_info_set_size ( struct dir_info *p, guint64 size);
This function sets the directory's total size.
Parameters
p | the directory information to set the size |
size | the size |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
dir_info_add_sub_folder
Adds a subfolder to the directory.
gint dir_info_add_sub_folder ( struct dir_info *p);
This function adds a subfolder to the directory. This function increments the number of subfolders by 1.
Parameters
p | the directory information to add subfolder |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
dir_info_add_n_sub_folder
Adds a number of subfolders to the directory.
gint dir_info_add_n_sub_folder ( struct dir_info *p, gint n);
This function adds a number of subfolders to the directory. This function increments the number of subfolders by n.
Parameters
p | the directory information to add subfolders |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
dir_info_add_size
Adds a size to the directory's size.
gint dir_info_add_size ( struct dir_info *p, guint64 size);
This function adds a size to the directory's total size. This function increments the number of subfolders by the size to add.
Parameters
p | the directory information to add size |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
dir_info_get_sub_folder
Gets the directory's number of subfolders.
gint dir_info_get_sub_folder ( struct dir_info *p);
This function gets the directory's subfolders.
Parameters
p | the directory information to get the number of subfolders |
Result: the number of subfolders. Returns -1 when an error occured. .
dir_info_get_size
Gets the directory's number of subfolders.
guint64 dir_info_get_size ( struct dir_info *p);
This function gets the directory's subfolders.
Parameters
p | the directory information to get the number of subfolders |
Result: the number of subfolders. Returns -1 when an error occured. .
dir_info_free
Frees datas structure.
gint dir_info_free ( struct dir_info *p);
This function frees the directory information's datas.
Parameters
p | the directory information to free |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
|