Top |
#define | GNOME_VFS_FILE_INFO_SYMLINK() |
#define | GNOME_VFS_FILE_INFO_SET_SYMLINK() |
#define | GNOME_VFS_FILE_INFO_LOCAL() |
#define | GNOME_VFS_FILE_INFO_SET_LOCAL() |
#define | GNOME_VFS_FILE_INFO_SUID() |
#define | GNOME_VFS_FILE_INFO_SGID() |
#define | GNOME_VFS_FILE_INFO_STICKY() |
#define | GNOME_VFS_FILE_INFO_SET_SUID() |
#define | GNOME_VFS_FILE_INFO_SET_SGID() |
#define | GNOME_VFS_FILE_INFO_SET_STICKY() |
GnomeVFSFileInfo * | gnome_vfs_file_info_new () |
void | gnome_vfs_file_info_unref () |
void | gnome_vfs_file_info_ref () |
void | gnome_vfs_file_info_clear () |
const char * | gnome_vfs_file_info_get_mime_type () |
void | gnome_vfs_file_info_copy () |
GnomeVFSFileInfo * | gnome_vfs_file_info_dup () |
gboolean | gnome_vfs_file_info_matches () |
GList * | gnome_vfs_file_info_list_ref () |
GList * | gnome_vfs_file_info_list_unref () |
GList * | gnome_vfs_file_info_list_copy () |
void | gnome_vfs_file_info_list_free () |
GnomeVFSGetFileInfoResult * | gnome_vfs_get_file_info_result_dup () |
void | gnome_vfs_get_file_info_result_free () |
enum | GnomeVFSFileFlags |
enum | GnomeVFSFileType |
enum | GnomeVFSFileInfoFields |
enum | GnomeVFSFilePermissions |
enum | GnomeVFSFileInfoOptions |
enum | GnomeVFSSetFileInfoMask |
GnomeVFSGetFileInfoResult | |
typedef | GnomeVFSInodeNumber |
GnomeVFSFileInfo |
#define GNOME_VFS_FILE_INFO_SYMLINK(info)
Determines whether a file is a symbolic link given info
.
#define GNOME_VFS_FILE_INFO_SET_SYMLINK(info, value)
Set the symbolic link field in info
to value
.
info |
GnomeVFSFileInfo struct |
|
value |
if |
#define GNOME_VFS_FILE_INFO_LOCAL(info)
Determines whether a file is local given info
.
#define GNOME_VFS_FILE_INFO_SET_LOCAL(info, value)
Set the "local file" field in info
to value
.
#define GNOME_VFS_FILE_INFO_SUID(info)
Determines whether a file belongs to the super user.
#define GNOME_VFS_FILE_INFO_SGID(info)
Determines whether a file belongs to the super user's group.
#define GNOME_VFS_FILE_INFO_STICKY(info)
Determines whether a file has the sticky bit set, given info
#define GNOME_VFS_FILE_INFO_SET_SUID(info, value)
Set the SUID field in info
to value
.
info |
GnomeVFSFileInfo struct |
|
value |
if |
#define GNOME_VFS_FILE_INFO_SET_SGID(info, value)
Set the SGID field in info
to value
.
info |
GnomeVFSFileInfo struct |
|
value |
if |
#define GNOME_VFS_FILE_INFO_SET_STICKY(info, value)
Set the sticky bit in info
to value
.
info |
GnomeVFSFileInfo struct |
|
value |
if |
GnomeVFSFileInfo *
gnome_vfs_file_info_new (void
);
Allocate and initialize a new GnomeVFSFileInfo struct.
void
gnome_vfs_file_info_unref (GnomeVFSFileInfo *info
);
Decreases the refcount of info
by 1. Frees the struct info
if refcount becomes 0.
void
gnome_vfs_file_info_ref (GnomeVFSFileInfo *info
);
Increment refcount of info
by 1.
void
gnome_vfs_file_info_clear (GnomeVFSFileInfo *info
);
Clear info
so that it's ready to accept new data. This is
supposed to be used when info
already contains meaningful information which
we want to replace.
const char *
gnome_vfs_file_info_get_mime_type (GnomeVFSFileInfo *info
);
Retrieve MIME type from info
. There is no need to free the return
value.
void gnome_vfs_file_info_copy (GnomeVFSFileInfo *dest
,const GnomeVFSFileInfo *src
);
Copy information from src
into dest
.
GnomeVFSFileInfo *
gnome_vfs_file_info_dup (const GnomeVFSFileInfo *orig
);
Duplicates orig
and returns it.
gboolean gnome_vfs_file_info_matches (const GnomeVFSFileInfo *a
,const GnomeVFSFileInfo *b
);
Compare the two file info structs, return TRUE
if they match exactly
the same file data.
GList *
gnome_vfs_file_info_list_ref (GList *list
);
Increments the refcount of the items in list
by one.
GList *
gnome_vfs_file_info_list_unref (GList *list
);
Decrements the refcount of the items in list
by one.
Note that the list is *not freed* even if each member of the list
is freed.
GList *
gnome_vfs_file_info_list_copy (GList *list
);
Creates a duplicate of list
, and references each member of
that list.
void
gnome_vfs_file_info_list_free (GList *list
);
Decrements the refcount of each member of list
by one,
and frees the list itself.
GnomeVFSGetFileInfoResult *
gnome_vfs_get_file_info_result_dup (GnomeVFSGetFileInfoResult *result
);
Duplicate result
.
Note: The internal uri and fileinfo objects are not duplicated but their refcount is incremented by 1.
Since: 2.12
void
gnome_vfs_get_file_info_result_free (GnomeVFSGetFileInfoResult *result
);
Unrefs the internal uri and fileinfo objects and frees the
memory allocated for result
.
Since: 2.12
Packed boolean bitfield representing special flags a GnomeVFSFileInfo struct can have.
Maps to a stat
mode, and identifies the kind of file represented by a
GnomeVFSFileInfo struct, stored in the type
field.
The file type is unknown (none of the types below matches). |
||
The file is a regular file (stat: |
||
The file is a directory (stat: |
||
The file is a FIFO (stat: |
||
The file is a socket (stat: |
||
The file is a character device (stat: |
||
The file is a block device (stat: |
||
The file is a symbolic link (stat: |
Flags indicating what fields in a GnomeVFSFileInfo struct are valid. Name is always assumed valid (how else would you have gotten a FileInfo struct otherwise?)
No fields are valid |
||
Type field is valid |
||
Permissions field is valid |
||
Flags field is valid |
||
Device field is valid |
||
Inode field is valid |
||
Link count field is valid |
||
Size field is valid |
||
Block count field is valid |
||
I/O Block Size field is valid |
||
Access time field is valid |
||
Modification time field is valid |
||
Creating time field is valid |
||
Symlink name field is valid |
||
Mime type field is valid |
||
Access bits of the permissions bitfield are valid |
||
UID and GID information are valid |
||
ACL field is valid |
||
SELinux Security context is valid |
File permissions. Some of these fields correspond to traditional UNIX semantics, others provide more abstract concepts.
GNOME_VFS_PERM_ACCESS_
* fields.
UID bit |
||
GID bit |
||
Sticky bit. |
||
Owner has read permission. |
||
Owner has write permission. |
||
Owner has execution permission. |
||
Owner has all permissions. |
||
Group has read permission. |
||
Group has write permission. |
||
Group has execution permission. |
||
Group has all permissions. |
||
Others have read permission. |
||
Others have write permission. |
||
Others have execution permission. |
||
Others have all permissions. |
||
This file is readable for the current client. |
||
This file is writable for the current client. |
||
This file is executable for the current client. |
Packed boolean bitfield representing options that can
be passed into a gnome_vfs_get_file_info()
call (or other
related calls that return file info) and affect the operation
of get_file_info.
default flags |
||
detect the MIME type |
||
only use fast MIME type detection (extensions) |
||
force slow MIME type detection where available (sniffing, algorithmic detection, etc) |
||
automatically follow symbolic links and retrieve the properties of their target (recommended) |
||
tries to get data similar to what would return access(2) on a local file system (ie is the file readable, writable and/or executable). Can be really slow on remote file systems |
||
When reading a directory, only get the filename (if doing so is faster). Useful to e.g. count the number of files. |
||
get ACLs for the file |
||
Packed boolean bitfield representing the aspects of the file
to be changed in a gnome_vfs_set_file_info()
call.
typedef struct { GnomeVFSURI *uri; GnomeVFSResult result; GnomeVFSFileInfo *file_info; } GnomeVFSGetFileInfoResult;
This data structure encapsulates the details of an individual file
info request that was part of a mass file info request launched
through gnome_vfs_async_get_file_info()
, and is passed to a
GnomeVFSAsyncGetFileInfoCallback.
GnomeVFSURI * |
The GnomeVFSURI the file info was requested for. |
|
GnomeVFSResult |
The GnomeVFSResult of the file info request. |
|
GnomeVFSFileInfo * |
The GnomeVFSFileInfo that was retrieved. |
typedef GnomeVFSFileSize GnomeVFSInodeNumber;
Represents the i-node of a file, this is a low level data structure that the operating system uses to hold information about a file.
typedef struct { char *name; GnomeVFSFileInfoFields valid_fields; GnomeVFSFileType type; GnomeVFSFilePermissions permissions; GnomeVFSFileFlags flags; dev_t device; GnomeVFSInodeNumber inode; guint link_count; guint uid; guint gid; GnomeVFSFileSize size; GnomeVFSFileSize block_count; guint io_block_size; time_t atime; time_t mtime; time_t ctime; char *symlink_name; char *mime_type; guint refcount; /* File ACLs */ GnomeVFSACL *acl; /* SELinux security context. -- ascii string, raw format. */ char* selinux_context; } GnomeVFSFileInfo;
io_block_size
if applicable.
For network file systems, this may be set to very big values allowing
parallelization.
The GnomeVFSFileInfo structure contains information about a file.
A char * specifying the base name of the file (without any path string). |
||
GnomeVFSFileInfoFields |
GnomeVFSFileInfoFields specifying which fields of
GnomeVFSFileInfo are valid. Note that |
|
GnomeVFSFileType |
The GnomeVFSFileType of the file (i.e. regular, directory, block device, ...)
if |
|
GnomeVFSFilePermissions |
The GnomeVFSFilePermissions corresponding to the UNIX-like
permissions of the file, if |
|
GnomeVFSFileFlags |
GnomeVFSFileFlags providing additional information about the file,
for instance whether it is local or a symbolic link, if
|
|
Identifies the device the file is located on, if
|
||
GnomeVFSInodeNumber |
Identifies the inode corresponding to the file, if
|
|
guint |
Counts the number of hard links to the file, if
|
|
guint |
The user owning the file, if |
|
guint |
The user owning the file, if |
|
GnomeVFSFileSize |
The size of the file in bytes (a GnomeVFSFileSize),
if |
|
GnomeVFSFileSize |
The size of the file in file system blocks (a GnomeVFSFileSize),
if |
|
guint |
The optimal buffer size for reading/writing the file, if
|
|
The time of the last file access, if |
||
The time of the last file contents modification, if |
||
The time of the last inode change, if |
||
This is the name of the file this link points to, |
||
This is a char * identifying the type of the file, if
|
||
guint |
The reference count of this file info, which is one by default, and
that can be increased using |
|