file_info_new
Creates a new file information.
struct file_info * file_info_new ( void);
This function creates a new file information. It's an allocation function.
Result: a pointer to the file information structure. Returns NULL when an error occured. .
file_info_set_name
Sets the file name.
gint file_info_set_name ( struct file_info *p, gchar *name);
This function sets the name of the file
Parameters
p | the file information to set the name |
name | the name |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
file_info_set_isdirectory
Sets if is a folder.
gint file_info_set_isdirectory ( struct file_info *p, gboolean b);
This function sets if the file information is a folder.
Parameters
p | the file information to set is a folder |
b | file/folder status |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
file_info_set_rights
Sets the file rights.
gint file_info_set_rights ( struct file_info *p, gchar *rights);
This function sets the file information rights. Sample : -rwxrwxrwx
Parameters
p | the file information to set rights |
rights | the rights |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
file_info_set_owner
Sets the file owner.
gint file_info_set_owner ( struct file_info *p, gchar *owner);
This function sets the file information owner.
Parameters
p | the file information to set owner |
owner | the owner |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
file_info_set_group
Sets the file owner group.
gint file_info_set_group ( struct file_info *p, gchar *group);
This function sets the file information owner group.
Parameters
p | the file information to set owner group |
group | the group |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
file_info_set_size
Sets the file size.
gint file_info_set_size ( struct file_info *p, guint64 size);
This function sets the file information size.
Parameters
p | the file information to set size |
size | the size |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
file_info_set_inode
Sets the file inode.
gint file_info_set_inode ( struct file_info *p, glong inode);
This function sets the file information inode.
Parameters
p | the file information to set inode |
inode | the inode |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
file_info_set_cdate
Sets the file creation date.
gint file_info_set_cdate ( struct file_info *p, gulong cdate);
This function sets the file information creation date.
Parameters
p | the file information to set creation date |
cdate | the creation date |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
file_info_set_adate
Sets the file last access date.
gint file_info_set_adate ( struct file_info *p, gulong adate);
This function sets the file information last access date.
Parameters
p | the file information to set last access date |
adate | the last access date |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
file_info_set_mdate
Sets the file last modification date.
gint file_info_set_mdate ( struct file_info *p, gulong mdate);
This function sets the file last information modification date.
Parameters
p | the information to set last modification date |
mdate | the last modification date |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
file_info_set_category
Sets the file category.
gint file_info_set_category ( struct file_info *p, struct category *category);
This function sets the file information category. The category is struct category
Parameters
p | the information to set category |
category | the category |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
file_info_set_description
Sets the file description.
gint file_info_set_description ( struct file_info *p, gchar *description);
This function sets the file information description.
Parameters
p | the file information to set description |
description | the description |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
file_info_get_name
Gets the file name.
gchar * file_info_get_name ( struct file_info *p);
This function gets the file information name.
Parameters
p | the file information to get name |
Result: The name. Returns NULL when an error occured. .
file_info_get_isdirectory
Gets if is a folder.
gboolean file_info_get_isdirectory ( struct file_info *p);
This function gets if the file information is folder.
Parameters
p | the file information to get if is a folder |
Result: TRUE if is a folder or FALSE if is a file. Returns FALSE when an error occured. .
file_info_get_is_real_directory
Gets if is a real folder.
gboolean file_info_get_is_real_directory ( struct file_info *p);
This function gets if the file information is a real folder. "." and ".." are not a real folder
Parameters
p | the file information to get if is a folder |
Result: TRUE if is a folder or FALSE if is a file. Returns FALSE when an error occured. .
file_info_get_rights
Gets the file rights.
gchar * file_info_get_rights ( struct file_info *p);
this function gets the file information rights.
Parameters
p | the file information to get rights |
Result: The rights. Returns NULL when an error occured. .
file_info_get_owner
Gets the file owner.
gchar * file_info_get_owner ( struct file_info *p);
This function gets the file information owner.
Parameters
p | the file information to get owner |
Result: The owner. Returns NULL when an error occured. .
file_info_get_group
Gets the file owner group.
gchar * file_info_get_group ( struct file_info *p);
This function gets the file information owner group.
Parameters
p | the file information to get owner group |
Result: The owner group. Returns NULL when an error occured. .
file_info_get_size
Gets the file size.
guint64 file_info_get_size ( struct file_info *p);
This functions gets the file information size.
Parameters
p | the file information to get size |
Result: The size. Returns -1 when an error occured. .
file_info_get_inode
Gets the file inode.
glong file_info_get_inode ( struct file_info *p);
This function gets the file information inode.
Parameters
p | the file information to get inode |
Result: The inode. Returns -1 when an error occured. .
file_info_get_cdate
Gets the file creation date.
gulong file_info_get_cdate ( struct file_info *p);
This function gets the file information creation date.
Parameters
p | the file information to get creation date |
Result: The creation date. Returns 0 when an error occured. .
file_info_get_adate
Gets the file last access date.
gulong file_info_get_adate ( struct file_info *p);
This function gets the file information last access date.
Parameters
p | the file information to get last access date |
Result: The last access date. Returns 0 when an error occured. .
file_info_get_mdate
Gets the file last modification date.
gulong file_info_get_mdate ( struct file_info *p);
This function gets the file information last modification date.
Parameters
p | the file information to get last modification date |
Result: The last modification date. Returns 0 when an error occured. .
file_info_get_category
Gets the file category.
struct category * file_info_get_category ( struct file_info *p);
This function gets the file information category. The category is the category datas structure.
Parameters
p | the file information to get category |
Result: The category. Returns NULL when an error occured. .
file_info_get_category_name
Gets the file category name.
gchar * file_info_get_category_name ( struct file_info *p);
This function gets the file category name.
Parameters
p | the file information to get category name |
Result: The category name. Returns "" when there are not category. Returns NULL when an error occured. .
file_info_get_category_index
Gets the file category index.
gint file_info_get_category_index ( struct file_info *p);
This function gets the file information category index.
Parameters
p | the file information to get category index |
Result: The category index. Returns -1 when an error occured. .
file_info_get_description
Gets the file description.
gchar * file_info_get_description ( struct file_info *p);
This function gets the file information description.
Parameters
p | the file information to get description |
Result: The description. Returns NULL when an error occured. .
file_info_get_cdate_to_gchar
Gets the formated file creation date.
gchar * file_info_get_cdate_to_gchar ( struct file_info *p);
This function gets the formated file information creation date.
Parameters
p | the file information to get formated creation date |
Result: The formated creation date. Must be freed with g_free(). Returns NULL when an error occured. .
file_info_get_adate_to_gchar
Gets the formated file last access date.
gchar * file_info_get_adate_to_gchar ( struct file_info *p);
This function gets the formated file information last access date.
Parameters
p | the file information to get formated last access date |
Result: The formated last access date. Must be freed with g_free(). Returns NULL when an error occured. .
file_info_get_mdate_to_gchar
Gets the formated file last modification date.
gchar * file_info_get_mdate_to_gchar ( struct file_info *p);
This function gets the formated file information last modification date.
Parameters
p | the file information to get last modification date |
Result: The formated last modification date. Must be freed with g_free(). Returns NULL when an error occured. .
file_info_free
Frees datas structure.
gint file_info_free ( struct file_info *p);
This function frees the file information datas structure. Doesn't free Category because it's collaborative.
Parameters
p | the file information to free |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
|