Getting and Setting File Information

Getting and Setting File Information — Convenient high-level abstraction for obtaining and setting file information, including ACLs.

Synopsis

MateVFSResult       mate_vfs_get_file_info              (const gchar *text_uri,
                                                         MateVFSFileInfo *info,
                                                         MateVFSFileInfoOptions options);
MateVFSResult       mate_vfs_get_file_info_uri          (MateVFSURI *uri,
                                                         MateVFSFileInfo *info,
                                                         MateVFSFileInfoOptions options);
MateVFSResult       mate_vfs_get_file_info_from_handle  (MateVFSHandle *handle,
                                                         MateVFSFileInfo *info,
                                                         MateVFSFileInfoOptions options);
MateVFSResult       mate_vfs_set_file_info_uri          (MateVFSURI *uri,
                                                         MateVFSFileInfo *info,
                                                         MateVFSSetFileInfoMask mask);
MateVFSResult       mate_vfs_set_file_info              (const gchar *text_uri,
                                                         MateVFSFileInfo *info,
                                                         MateVFSSetFileInfoMask mask);

Description

Applications can use the mate_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 MateVFSFileInfo data structure that holds the file information, there are several methods that can be used to manipulate this information. See MateVFSFileInfo for more information.

Details

mate_vfs_get_file_info ()

MateVFSResult       mate_vfs_get_file_info              (const gchar *text_uri,
                                                         MateVFSFileInfo *info,
                                                         MateVFSFileInfoOptions options);

Retrieve information about text_uri. The information will be stored in info.

text_uri :

uri of the file for which information will be retrieved.

info :

pointer to a MateVFSFileInfo object that will hold the information for the file on return.

options :

options for retrieving file information.

Returns :

an integer representing the result of the operation.

mate_vfs_get_file_info_uri ()

MateVFSResult       mate_vfs_get_file_info_uri          (MateVFSURI *uri,
                                                         MateVFSFileInfo *info,
                                                         MateVFSFileInfoOptions options);

Retrieve information about text_uri. The information will be stored in info.

uri :

uri of the file for which information will be retrieved.

info :

pointer to a MateVFSFileInfo object that will hold the information for the file on return.

options :

options for retrieving file information.

Returns :

an integer representing the result of the operation.

mate_vfs_get_file_info_from_handle ()

MateVFSResult       mate_vfs_get_file_info_from_handle  (MateVFSHandle *handle,
                                                         MateVFSFileInfo *info,
                                                         MateVFSFileInfoOptions options);

Retrieve information about an open file. The information will be stored in info.

handle :

handle of the file for which information must be retrieved.

info :

pointer to a MateVFSFileInfo object that will hold the information for the file on return.

options :

options for retrieving file information.

Returns :

an integer representing the result of the operation.

mate_vfs_set_file_info_uri ()

MateVFSResult       mate_vfs_set_file_info_uri          (MateVFSURI *uri,
                                                         MateVFSFileInfo *info,
                                                         MateVFSSetFileInfoMask 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 MateVFSFileInfoFields corresponding to the specified MateVFSSetFileInfoMask fields of mask. It is assumed that the info fields referenced by mask are valid.

uri :

a uri.

info :

information that must be set for the file.

mask :

bit mask representing which fields of info need to be set.

Returns :

an integer representing the result of the operation.

mate_vfs_set_file_info ()

MateVFSResult       mate_vfs_set_file_info              (const gchar *text_uri,
                                                         MateVFSFileInfo *info,
                                                         MateVFSSetFileInfoMask 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 MateVFSFileInfoFields corresponding to the specified MateVFSSetFileInfoMask fields of mask. It is assumed that the info fields referenced by mask are valid.

text_uri :

string representing the file location.

info :

information that must be set for the file.

mask :

bit mask representing which fields of info need to be set.

Returns :

an integer representing the result of the operation.

See Also