typedef enum {
GNOME_VFS_FILE_FLAGS_NONE = 0,
/* Whether the file is a symlink. */
GNOME_VFS_FILE_FLAGS_SYMLINK = 1 << 0,
/* Whether the file is on a local file system. */
GNOME_VFS_FILE_FLAGS_LOCAL = 1 << 1,
} GnomeVFSFileFlags;
typedef struct {
/* Base name of the file (no path). */
gchar *name;
/* Fields which are actually valid in this strcture. */
GnomeVFSFileInfoFields valid_fields;
/* File type (i.e. regular, directory, block device...). */
GnomeVFSFileType type;
/* File permissions. */
GnomeVFSFilePermissions permissions;
/* Flags for this file. */
GnomeVFSFileFlags flags;
/* This is only valid if `is_local' is TRUE (see below). */
dev_t device;
guint inode;
/* Link count. */
guint link_count;
/* UID, GID. */
guint uid;
guint gid;
/* Size in bytes. */
GnomeVFSFileSize size;
/* Size measured in units of 512-byte blocks. */
GnomeVFSFileSize block_count;
/* Optimal buffer size for reading/writing the file. */
guint io_block_size;
/* Access, modification and change times. */
time_t atime;
time_t mtime;
time_t ctime;
/* If the file is a symlink (see `flags'), this specifies the file the
link points to. */
gchar *symlink_name;
/* MIME type. */
gchar *mime_type;
guint refcount;
} GnomeVFSFileInfo;
typedef enum {
GNOME_VFS_XFER_PROGRESS_STATUS_OK = 0,
GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR = 1,
GNOME_VFS_XFER_PROGRESS_STATUS_OVERWRITE = 2,
/* during the duplicate status the progress callback is asked to
supply a new unique name */
GNOME_VFS_XFER_PROGRESS_STATUS_DUPLICATE = 3
} GnomeVFSXferProgressStatus;
enum GnomeVFSXferOverwriteMode
typedef enum {
/* Interrupt transferring with an error (GNOME_VFS_ERROR_FILEEXISTS). */
GNOME_VFS_XFER_OVERWRITE_MODE_ABORT = 0,
/* Invoke the progress callback with a
`GNOME_VFS_XFER_PROGRESS_STATUS_OVERWRITE' status code. */
GNOME_VFS_XFER_OVERWRITE_MODE_QUERY = 1,
/* Overwrite files silently. */
GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE = 2,
/* Ignore files silently. */
GNOME_VFS_XFER_OVERWRITE_MODE_SKIP = 3
} GnomeVFSXferOverwriteMode;
typedef enum {
/* Interrupt transferring with an error (code returned is code of the
operation that has caused the error). */
GNOME_VFS_XFER_ERROR_MODE_ABORT = 0,
/* Invoke the progress callback with a
`GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR' status code. */
GNOME_VFS_XFER_ERROR_MODE_QUERY = 1,
} GnomeVFSXferErrorMode;
enum GnomeVFSXferErrorAction
typedef enum {
/* Interrupt operation and return `GNOME_VFS_ERROR_INTERRUPTED'. */
GNOME_VFS_XFER_ERROR_ACTION_ABORT = 0,
/* Try the same operation again. */
GNOME_VFS_XFER_ERROR_ACTION_RETRY = 1,
/* Skip this file and continue normally. */
GNOME_VFS_XFER_ERROR_ACTION_SKIP = 2
} GnomeVFSXferErrorAction;
enum GnomeVFSXferPhase
typedef enum {
/* Initial phase */
GNOME_VFS_XFER_PHASE_INITIAL,
/* Checking if destination can handle move/copy */
GNOME_VFS_XFER_CHECKING_DESTINATION,
/* Collecting file list */
GNOME_VFS_XFER_PHASE_COLLECTING,
/* File list collected (*) */
GNOME_VFS_XFER_PHASE_READYTOGO,
/* Opening source file for reading */
GNOME_VFS_XFER_PHASE_OPENSOURCE,
/* Creating target file for copy */
GNOME_VFS_XFER_PHASE_OPENTARGET,
/* Copying data from source to target (*) */
GNOME_VFS_XFER_PHASE_COPYING,
/* Moving file from source to target (*) */
GNOME_VFS_XFER_PHASE_MOVING,
/* Reading data from source file */
GNOME_VFS_XFER_PHASE_READSOURCE,
/* Writing data to target file */
GNOME_VFS_XFER_PHASE_WRITETARGET,
/* Closing source file */
GNOME_VFS_XFER_PHASE_CLOSESOURCE,
/* Closing target file */
GNOME_VFS_XFER_PHASE_CLOSETARGET,
/* Deleting source file */
GNOME_VFS_XFER_PHASE_DELETESOURCE,
/* Setting attributes on target file */
GNOME_VFS_XFER_PHASE_SETATTRIBUTES,
/* Go to the next file (*) */
GNOME_VFS_XFER_PHASE_FILECOMPLETED,
/* cleaning up after a move (removing source files, etc.) */
GNOME_VFS_XFER_PHASE_CLEANUP,
/* Operation finished (*) */
GNOME_VFS_XFER_PHASE_COMPLETED,
GNOME_VFS_XFER_NUM_PHASES
} GnomeVFSXferPhase;
GnomeVFSXferProgressInfo
typedef struct {
/* Progress status (see above for a description). */
GnomeVFSXferProgressStatus status;
/* VFS status code. If `status' is
`GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR', you should look at this
member to know what has happened. */
GnomeVFSResult vfs_status;
/* Current phase in the transferring process. */
GnomeVFSXferPhase phase;
/* Source URI. FIXME bugzilla.eazel.com 1206: change name? */
gchar *source_name;
/* Destination URI. FIXME bugzilla.eazel.com 1206: change name? */
gchar *target_name;
/* Index of file being copied. */
gulong file_index;
/* Total number of files to be copied. */
gulong files_total;
/* Total number of bytes to be copied. */
GnomeVFSFileSize bytes_total;
/* Total size of this file (in bytes). */
GnomeVFSFileSize file_size;
/* Bytes copied for this file so far. */
GnomeVFSFileSize bytes_copied;
/* Total amount of data copied from the beginning. */
GnomeVFSFileSize total_bytes_copied;
/* Target unique name used when duplicating, etc. to avoid collisions */
gchar *duplicate_name;
/* Count used in the unique name e.g. (copy 2), etc. */
int duplicate_count;
gboolean top_level_item;
/* indicates that the copied/moved/deleted item is an actual item
* passed in the uri list rather than one encountered by recursively
* traversing directories. Used by metadata copying.
*/
} GnomeVFSXferProgressInfo;