| GnomeVFS - Filesystem Abstraction library | ||||
|---|---|---|---|---|
constchar * gnome_vfs_mime_type_from_mode (mode_t mode); constchar * gnome_vfs_mime_type_from_mode_or_default (mode_t mode, constchar *defaultv);void gnome_vfs_stat_to_file_info (GnomeVFSFileInfo *file_info, conststruct stat *statptr); GnomeVFSResult gnome_vfs_set_meta (GnomeVFSFileInfo *info, constchar *file_name, constchar *meta_key); GnomeVFSResult gnome_vfs_set_meta_for_list (GnomeVFSFileInfo *info, constchar *file_name, constGList *meta_keys); constchar * gnome_vfs_get_special_mime_type (GnomeVFSURI *uri);
constchar * gnome_vfs_mime_type_from_mode (mode_t mode);
Returns a MIME type based on the mode if it
references a special file (directory, device, fifo, socket or symlink).
This function works like gnome_vfs_mime_type_from_mode_or_default(), except
that it returns NULLgnome_vfs_mime_type_from_mode_or_default()
would return a fallback MIME type.
mode : |
value as the st_mode field in the system stat structure. |
| Returns : | a string containing the MIME type, or NULLmode is not a
special file.
|
constchar * gnome_vfs_mime_type_from_mode_or_default (mode_t mode, constchar *defaultv);
Returns a MIME type based on the mode if it
references a special file (directory, device, fifo, socket or symlink).
This function works like gnome_vfs_mime_type_from_mode() except that
it returns defaultv instead of NULL
mode : |
value as the st_mode field in the system stat structure. |
defaultv : |
default fallback MIME type. |
| Returns : | a string containing the MIME type, or defaultv if mode is not a
special file.
|
void gnome_vfs_stat_to_file_info (GnomeVFSFileInfo *file_info, conststruct stat *statptr);
Fills the file_info structure with the values from statptr structure.
file_info : |
a GnomeVFSFileInfo which will be filled. |
statptr : |
pointer to a 'stat' structure. |
GnomeVFSResult gnome_vfs_set_meta (GnomeVFSFileInfo *info, constchar *file_name, constchar *meta_key);
info : |
|
file_name : |
|
meta_key : |
|
| Returns : |
GnomeVFSResult gnome_vfs_set_meta_for_list (GnomeVFSFileInfo *info, constchar *file_name, constGList *meta_keys);
info : |
|
file_name : |
|
meta_keys : |
|
| Returns : |
constchar * gnome_vfs_get_special_mime_type (GnomeVFSURI *uri);
Gets the MIME type for uri, this function only returns the type
when the uri points to a file that can't be sniffed (sockets,
directories, devices, and fifos).
uri : |
a GnomeVFSURI to get the mime type for. |
| Returns : | a string containing the mime type or NULLuri doesn't
present a special file.
|