GnomeVFS - Filesystem Abstraction library | ||||
---|---|---|---|---|
Top | Description |
Getting and Setting File InformationGetting and Setting File Information — Convenient high-level abstraction for obtaining and setting file information, including ACLs. |
Synopsis
GnomeVFSResult gnome_vfs_get_file_info (const gchar *text_uri, GnomeVFSFileInfo *info, GnomeVFSFileInfoOptions options); GnomeVFSResult gnome_vfs_get_file_info_uri (GnomeVFSURI *uri, GnomeVFSFileInfo *info, GnomeVFSFileInfoOptions options); GnomeVFSResult gnome_vfs_get_file_info_from_handle (GnomeVFSHandle *handle, GnomeVFSFileInfo *info, GnomeVFSFileInfoOptions options); GnomeVFSResult gnome_vfs_set_file_info_uri (GnomeVFSURI *uri, GnomeVFSFileInfo *info, GnomeVFSSetFileInfoMask mask); GnomeVFSResult gnome_vfs_set_file_info (const gchar *text_uri, GnomeVFSFileInfo *info, GnomeVFSSetFileInfoMask mask);
Description
Applications can use the gnome_vfs_get_file_info()
family of operations to
retrieve file information, as this operation can be quite costly in
terms of time (specilly when sniffing the MIME type) applications can
specify which information need at any time, reducing the performance
impact.
All of these operations use a GnomeVFSFileInfo data structure that holds the file information, there are several methods that can be used to manipulate this information. See GnomeVFSFileInfo for more information.
Details
gnome_vfs_get_file_info ()
GnomeVFSResult gnome_vfs_get_file_info (const gchar *text_uri, GnomeVFSFileInfo *info, GnomeVFSFileInfoOptions options);
Retrieve information about text_uri
. The information will be stored in
info
.
|
uri of the file for which information will be retrieved. |
|
pointer to a GnomeVFSFileInfo object that will hold the information for the file on return. |
|
options for retrieving file information. |
Returns : |
an integer representing the result of the operation. |
gnome_vfs_get_file_info_uri ()
GnomeVFSResult gnome_vfs_get_file_info_uri (GnomeVFSURI *uri, GnomeVFSFileInfo *info, GnomeVFSFileInfoOptions options);
Retrieve information about text_uri
. The information will be stored in
info
.
|
uri of the file for which information will be retrieved. |
|
pointer to a GnomeVFSFileInfo object that will hold the information for the file on return. |
|
options for retrieving file information. |
Returns : |
an integer representing the result of the operation. |
gnome_vfs_get_file_info_from_handle ()
GnomeVFSResult gnome_vfs_get_file_info_from_handle (GnomeVFSHandle *handle, GnomeVFSFileInfo *info, GnomeVFSFileInfoOptions options);
Retrieve information about an open file. The information will be stored in
info
.
|
handle of the file for which information must be retrieved. |
|
pointer to a GnomeVFSFileInfo object that will hold the information for the file on return. |
|
options for retrieving file information. |
Returns : |
an integer representing the result of the operation. |
gnome_vfs_set_file_info_uri ()
GnomeVFSResult gnome_vfs_set_file_info_uri (GnomeVFSURI *uri, GnomeVFSFileInfo *info, GnomeVFSSetFileInfoMask mask);
Set file information for uri
; only the information for which the
corresponding bit in mask
is set is actually modified.
Note
info
's valid_fields
is not required to contain the
GnomeVFSFileInfoFields corresponding to the specified
GnomeVFSSetFileInfoMask fields of mask
. It
is assumed that the info
fields referenced by mask
are valid.
|
a uri. |
|
information that must be set for the file. |
|
bit mask representing which fields of info need to be set.
|
Returns : |
an integer representing the result of the operation. |
gnome_vfs_set_file_info ()
GnomeVFSResult gnome_vfs_set_file_info (const gchar *text_uri, GnomeVFSFileInfo *info, GnomeVFSSetFileInfoMask mask);
Set file information for uri
; only the information for which the
corresponding bit in mask
is set is actually modified.
Note
info
's valid_fields
is not required to contain the
GnomeVFSFileInfoFields corresponding to the specified
GnomeVFSSetFileInfoMask fields of mask
. It
is assumed that the info
fields referenced by mask
are valid.
|
string representing the file location. |
|
information that must be set for the file. |
|
bit mask representing which fields of info need to be set.
|
Returns : |
an integer representing the result of the operation. |