Gnome::Vfs Namespace Reference


Classes

class  Address
class  FileInfoResult
class  FindDirectoryResult
class  DirectoryHandle
class  Drive
class  exception
class  FileInfo
class  Handle
class  MimeAction
class  MimeApplication
class  MimeMonitor
class  MonitorHandle
class  ResolveHandle
class  Uri
class  VolumeMonitor
class  Volume

Namespaces

namespace  ApplicationRegistry
namespace  Async
namespace  DnsSd
namespace  Mime
namespace  Transfer
 These functions can be used to transfer files from one URI to another.

Typedefs

typedef Glib::ListHandle<
Glib::ustring > 
ListHandleStrings
typedef GnomeVFSFileSize FileSize
typedef GnomeVFSFileOffset FileOffset

Enumerations

enum  FindDirectoryKind { DIRECTORY_KIND_DESKTOP = 1000, DIRECTORY_KIND_TRASH }
enum  FileInfoOptions {
  FILE_INFO_DEFAULT = 0, FILE_INFO_GET_MIME_TYPE = 1 << 0, FILE_INFO_FORCE_FAST_MIME_TYPE = 1 << 1, FILE_INFO_FORCE_SLOW_MIME_TYPE = 1 << 2,
  FILE_INFO_FOLLOW_LINKS = 1 << 3, FILE_INFO_GET_ACCESS_RIGHTS = 1 << 4
}
enum  Result {
  OK, ERROR_NOT_FOUND, ERROR_GENERIC, ERROR_INTERNAL,
  ERROR_BAD_PARAMETERS, ERROR_NOT_SUPPORTED, ERROR_IO, ERROR_CORRUPTED_DATA,
  ERROR_WRONG_FORMAT, ERROR_BAD_FILE, ERROR_TOO_BIG, ERROR_NO_SPACE,
  ERROR_READ_ONLY, ERROR_INVALID_URI, ERROR_NOT_OPEN, ERROR_INVALID_OPEN_MODE,
  ERROR_ACCESS_DENIED, ERROR_TOO_MANY_OPEN_FILES, ERROR_EOF, ERROR_NOT_A_DIRECTORY,
  ERROR_IN_PROGRESS, ERROR_INTERRUPTED, ERROR_FILE_EXISTS, ERROR_LOOP,
  ERROR_NOT_PERMITTED, ERROR_IS_DIRECTORY, ERROR_NO_MEMORY, ERROR_HOST_NOT_FOUND,
  ERROR_INVALID_HOST_NAME, ERROR_HOST_HAS_NO_ADDRESS, ERROR_LOGIN_FAILED, ERROR_CANCELLED,
  ERROR_DIRECTORY_BUSY, ERROR_DIRECTORY_NOT_EMPTY, ERROR_TOO_MANY_LINKS, ERROR_READ_ONLY_FILE_SYSTEM,
  ERROR_NOT_SAME_FILE_SYSTEM, ERROR_NAME_TOO_LONG, ERROR_SERVICE_NOT_AVAILABLE, ERROR_SERVICE_OBSOLETE,
  ERROR_PROTOCOL_ERROR, ERROR_NO_MASTER_BROWSER, ERROR_NO_DEFAULT, ERROR_NO_HANDLER,
  ERROR_PARSE, ERROR_LAUNCH, ERROR_TIMEOUT, ERROR_NAMESERVER,
  NUM_ERRORS
}
enum  URIHideOptions {
  URI_HIDE_NONE = 0, URI_HIDE_USER_NAME = 1 << 0, URI_HIDE_PASSWORD = 1 << 1, URI_HIDE_HOST_NAME = 1 << 2,
  URI_HIDE_HOST_PORT = 1 << 3, URI_HIDE_TOPLEVEL_METHOD = 1 << 4, URI_HIDE_FRAGMENT_IDENTIFIER = 1 << 8
}
enum  DirectoryVisitOptions { DIRECTORY_VISIT_DEFAULT = 0, DIRECTORY_VISIT_SAMEFS = 1 << 0, DIRECTORY_VISIT_LOOPCHECK = 1 << 1 }
enum  OpenMode { OPEN_NONE = 0, OPEN_READ = 1 << 0, OPEN_WRITE = 1 << 1, OPEN_RANDOM = 1 << 2 }
enum  SeekPosition { SEEK_POS_START, SEEK_POS_CURRENT, SEEK_POS_END }
enum  FileFlags { FILE_FLAGS_NONE = 0, FILE_FLAGS_SYMLINK = 1 << 0, FILE_FLAGS_LOCAL = 1 << 1 }
enum  FileType {
  FILE_TYPE_UNKNOWN, FILE_TYPE_REGULAR, FILE_TYPE_DIRECTORY, FILE_TYPE_FIFO,
  FILE_TYPE_SOCKET, FILE_TYPE_CHARACTER_DEVICE, FILE_TYPE_BLOCK_DEVICE, FILE_TYPE_SYMBOLIC_LINK
}
enum  FilePermissions {
  PERM_SUID = S_ISUID, PERM_SGID = S_ISGID, PERM_STICKY = 01000, PERM_USER_READ = S_IRUSR,
  PERM_USER_WRITE = S_IWUSR, PERM_USER_EXEC = S_IXUSR, PERM_USER_ALL = S_IRUSR | S_IWUSR | S_IXUSR, PERM_GROUP_READ = S_IRGRP,
  PERM_GROUP_WRITE = S_IWGRP, PERM_GROUP_EXEC = S_IXGRP, PERM_GROUP_ALL = S_IRGRP | S_IWGRP | S_IXGRP, PERM_OTHER_READ = S_IROTH,
  PERM_OTHER_WRITE = S_IWOTH, PERM_OTHER_EXEC = S_IXOTH, PERM_OTHER_ALL = S_IROTH | S_IWOTH | S_IXOTH, PERM_ACCESS_READABLE = 1 << 16,
  PERM_ACCESS_WRITABLE = 1 << 17, PERM_ACCESS_EXECUTABLE = 1 << 18
}
enum  SetFileInfoMask {
  SET_FILE_INFO_NONE = 0, SET_FILE_INFO_NAME = 1 << 0, SET_FILE_INFO_PERMISSIONS = 1 << 1, SET_FILE_INFO_OWNER = 1 << 2,
  SET_FILE_INFO_TIME = 1 << 3
}
enum  MonitorType { MONITOR_FILE, MONITOR_DIRECTORY }
enum  MonitorEventType {
  MONITOR_EVENT_CHANGED, MONITOR_EVENT_DELETED, MONITOR_EVENT_STARTEXECUTING, MONITOR_EVENT_STOPEXECUTING,
  MONITOR_EVENT_CREATED, MONITOR_EVENT_METADATA_CHANGED
}
enum  MimeApplicationArgumentType { MIME_APPLICATION_ARGUMENT_TYPE_URIS, MIME_APPLICATION_ARGUMENT_TYPE_PATHS, MIME_APPLICATION_ARGUMENT_TYPE_URIS_FOR_NON_FILES }
enum  MimeActionType { MIME_ACTION_TYPE_NONE, MIME_ACTION_TYPE_APPLICATION, MIME_ACTION_TYPE_COMPONENT }
enum  TransferOptions {
  XFER_DEFAULT = 0, XFER_UNUSED_1 = 1 << 0, XFER_FOLLOW_LINKS = 1 << 1, XFER_UNUSED_2 = 1 << 2,
  XFER_RECURSIVE = 1 << 3, XFER_SAMEFS = 1 << 4, XFER_DELETE_ITEMS = 1 << 5, XFER_EMPTY_DIRECTORIES = 1 << 6,
  XFER_NEW_UNIQUE_DIRECTORY = 1 << 7, XFER_REMOVESOURCE = 1 << 8, XFER_USE_UNIQUE_NAMES = 1 << 9, XFER_LINK_ITEMS = 1 << 10,
  XFER_FOLLOW_LINKS_RECURSIVE = 1 << 11
}
enum  ProgressStatus { XFER_PROGRESS_STATUS_OK, XFER_PROGRESS_STATUS_VFSERROR, XFER_PROGRESS_STATUS_OVERWRITE, XFER_PROGRESS_STATUS_DUPLICATE }
enum  OverwriteMode { XFER_OVERWRITE_MODE_ABORT, XFER_OVERWRITE_MODE_QUERY, XFER_OVERWRITE_MODE_REPLACE, XFER_OVERWRITE_MODE_SKIP }
enum  OverwriteAction {
  XFER_OVERWRITE_ACTION_ABORT, XFER_OVERWRITE_ACTION_REPLACE, XFER_OVERWRITE_ACTION_REPLACE_ALL, XFER_OVERWRITE_ACTION_SKIP,
  XFER_OVERWRITE_ACTION_SKIP_ALL
}
enum  ErrorMode { XFER_ERROR_MODE_ABORT, XFER_ERROR_MODE_QUERY }
enum  ErrorAction { XFER_ERROR_ACTION_ABORT, XFER_ERROR_ACTION_RETRY, XFER_ERROR_ACTION_SKIP }
enum  Phase {
  XFER_PHASE_INITIAL, XFER_CHECKING_DESTINATION, XFER_PHASE_COLLECTING, XFER_PHASE_READYTOGO,
  XFER_PHASE_OPENSOURCE, XFER_PHASE_OPENTARGET, XFER_PHASE_COPYING, XFER_PHASE_MOVING,
  XFER_PHASE_READSOURCE, XFER_PHASE_WRITETARGET, XFER_PHASE_CLOSESOURCE, XFER_PHASE_CLOSETARGET,
  XFER_PHASE_DELETESOURCE, XFER_PHASE_SETATTRIBUTES, XFER_PHASE_FILECOMPLETED, XFER_PHASE_CLEANUP,
  XFER_PHASE_COMPLETED, XFER_NUM_PHASES
}
enum  VolumeType { VOLUME_TYPE_MOUNTPOINT, VOLUME_TYPE_VFS_MOUNT, VOLUME_TYPE_CONNECTED_SERVER }
enum  DeviceType {
  DEVICE_TYPE_UNKNOWN, DEVICE_TYPE_AUDIO_CD, DEVICE_TYPE_VIDEO_DVD, DEVICE_TYPE_HARDDRIVE,
  DEVICE_TYPE_CDROM, DEVICE_TYPE_FLOPPY, DEVICE_TYPE_ZIP, DEVICE_TYPE_JAZ,
  DEVICE_TYPE_NFS, DEVICE_TYPE_AUTOFS, DEVICE_TYPE_CAMERA, DEVICE_TYPE_MEMORY_STICK,
  DEVICE_TYPE_SMB, DEVICE_TYPE_APPLE, DEVICE_TYPE_MUSIC_PLAYER, DEVICE_TYPE_WINDOWS,
  DEVICE_TYPE_LOOPBACK, DEVICE_TYPE_NETWORK
}
enum  DNSSDServiceStatus { DNS_SD_SERVICE_ADDED, DNS_SD_SERVICE_REMOVED }
enum  MakeURIDirs { MAKE_URI_DIR_NONE = 0, MAKE_URI_DIR_HOMEDIR = 1 << 0, MAKE_URI_DIR_CURRENT = 1 << 1 }

Functions

FileInfoOptions operator| (FileInfoOptions lhs, FileInfoOptions rhs)
FileInfoOptions operator & (FileInfoOptions lhs, FileInfoOptions rhs)
FileInfoOptions operator^ (FileInfoOptions lhs, FileInfoOptions rhs)
FileInfoOptions operator~ (FileInfoOptions flags)
FileInfoOptionsoperator|= (FileInfoOptions &lhs, FileInfoOptions rhs)
FileInfoOptionsoperator &= (FileInfoOptions &lhs, FileInfoOptions rhs)
FileInfoOptionsoperator^= (FileInfoOptions &lhs, FileInfoOptions rhs)
URIHideOptions operator| (URIHideOptions lhs, URIHideOptions rhs)
URIHideOptions operator & (URIHideOptions lhs, URIHideOptions rhs)
URIHideOptions operator^ (URIHideOptions lhs, URIHideOptions rhs)
URIHideOptions operator~ (URIHideOptions flags)
URIHideOptionsoperator|= (URIHideOptions &lhs, URIHideOptions rhs)
URIHideOptionsoperator &= (URIHideOptions &lhs, URIHideOptions rhs)
URIHideOptionsoperator^= (URIHideOptions &lhs, URIHideOptions rhs)
DirectoryVisitOptions operator| (DirectoryVisitOptions lhs, DirectoryVisitOptions rhs)
DirectoryVisitOptions operator & (DirectoryVisitOptions lhs, DirectoryVisitOptions rhs)
DirectoryVisitOptions operator^ (DirectoryVisitOptions lhs, DirectoryVisitOptions rhs)
DirectoryVisitOptions operator~ (DirectoryVisitOptions flags)
DirectoryVisitOptionsoperator|= (DirectoryVisitOptions &lhs, DirectoryVisitOptions rhs)
DirectoryVisitOptionsoperator &= (DirectoryVisitOptions &lhs, DirectoryVisitOptions rhs)
DirectoryVisitOptionsoperator^= (DirectoryVisitOptions &lhs, DirectoryVisitOptions rhs)
OpenMode operator| (OpenMode lhs, OpenMode rhs)
OpenMode operator & (OpenMode lhs, OpenMode rhs)
OpenMode operator^ (OpenMode lhs, OpenMode rhs)
OpenMode operator~ (OpenMode flags)
OpenModeoperator|= (OpenMode &lhs, OpenMode rhs)
OpenModeoperator &= (OpenMode &lhs, OpenMode rhs)
OpenModeoperator^= (OpenMode &lhs, OpenMode rhs)
FileFlags operator| (FileFlags lhs, FileFlags rhs)
FileFlags operator & (FileFlags lhs, FileFlags rhs)
FileFlags operator^ (FileFlags lhs, FileFlags rhs)
FileFlags operator~ (FileFlags flags)
FileFlagsoperator|= (FileFlags &lhs, FileFlags rhs)
FileFlagsoperator &= (FileFlags &lhs, FileFlags rhs)
FileFlagsoperator^= (FileFlags &lhs, FileFlags rhs)
FilePermissions operator| (FilePermissions lhs, FilePermissions rhs)
FilePermissions operator & (FilePermissions lhs, FilePermissions rhs)
FilePermissions operator^ (FilePermissions lhs, FilePermissions rhs)
FilePermissions operator~ (FilePermissions flags)
FilePermissionsoperator|= (FilePermissions &lhs, FilePermissions rhs)
FilePermissionsoperator &= (FilePermissions &lhs, FilePermissions rhs)
FilePermissionsoperator^= (FilePermissions &lhs, FilePermissions rhs)
SetFileInfoMask operator| (SetFileInfoMask lhs, SetFileInfoMask rhs)
SetFileInfoMask operator & (SetFileInfoMask lhs, SetFileInfoMask rhs)
SetFileInfoMask operator^ (SetFileInfoMask lhs, SetFileInfoMask rhs)
SetFileInfoMask operator~ (SetFileInfoMask flags)
SetFileInfoMaskoperator|= (SetFileInfoMask &lhs, SetFileInfoMask rhs)
SetFileInfoMaskoperator &= (SetFileInfoMask &lhs, SetFileInfoMask rhs)
SetFileInfoMaskoperator^= (SetFileInfoMask &lhs, SetFileInfoMask rhs)
TransferOptions operator| (TransferOptions lhs, TransferOptions rhs)
TransferOptions operator & (TransferOptions lhs, TransferOptions rhs)
TransferOptions operator^ (TransferOptions lhs, TransferOptions rhs)
TransferOptions operator~ (TransferOptions flags)
TransferOptionsoperator|= (TransferOptions &lhs, TransferOptions rhs)
TransferOptionsoperator &= (TransferOptions &lhs, TransferOptions rhs)
TransferOptionsoperator^= (TransferOptions &lhs, TransferOptions rhs)
void init ()
void handle_result (GnomeVFSResult result) throw (Gnome::Vfs::exception)
MakeURIDirs operator| (MakeURIDirs lhs, MakeURIDirs rhs)
MakeURIDirs operator & (MakeURIDirs lhs, MakeURIDirs rhs)
MakeURIDirs operator^ (MakeURIDirs lhs, MakeURIDirs rhs)
MakeURIDirs operator~ (MakeURIDirs flags)
MakeURIDirsoperator|= (MakeURIDirs &lhs, MakeURIDirs rhs)
MakeURIDirsoperator &= (MakeURIDirs &lhs, MakeURIDirs rhs)
MakeURIDirsoperator^= (MakeURIDirs &lhs, MakeURIDirs rhs)
Glib::ustring format_file_size_for_display (FileSize size)
 Formats the file size passed in sizein a way that is easy for the user to read.
Glib::ustring escape_string (const Glib::ustring &unescaped_string)
 Escapes , replacing any and all special characters with equivalent escape sequences.
Glib::ustring escape_path_string (const Glib::ustring &path)
 Escapes , replacing only special characters that would not be found in paths (so '/', '&', '=', and '?' will not be escaped by this function).
Glib::ustring escape_host_and_path_string (const Glib::ustring &path)
 Escapes path, replacing only special characters that would not be found in paths or host name (so '/', '&', '=', ':', '@' and '?' will not be escaped by this function).
Glib::ustring escape_slashes (const Glib::ustring &unescaped_string)
 Escapes only '/' and '' characters in , replacing them with their escape sequence equivalents.
Glib::ustring unescape_string (const Glib::ustring &escaped_string, const Glib::ustring &illegal_characters=Glib::ustring())
 Decodes escaped characters (i.e.
Glib::ustring unescape_string_for_display (const Glib::ustring &escaped_string)
 Similar to unescape_string(), but it returns something semi-intelligable to a user even upon receiving traumatic input such as 00 or URIs in bad form.
Glib::ustring make_uri_canonical (const Glib::ustring &uri)
 gnome_vfs_make_path_name_canonical: : a file path, relative or absolute
Glib::ustring make_path_name_canonical (const Glib::ustring &path)
Glib::ustring expand_initial_tilde (const Glib::ustring &path)
 If path starts with a ~, representing the user's home directory, expand it to the actual path location.
Glib::ustring get_local_path_from_uri (const Glib::ustring &uri)
 Create a local path for a file:/// URI.
Glib::ustring get_uri_from_local_path (const Glib::ustring &local_full_path)
 Returns a file:/// URI for the local path .
bool is_executable_command_string (const Glib::ustring &command_string)
 Checks if command_string starts with the full path of an executable file or an executable in $PATH.
Glib::ustring icon_path_from_filename (const Glib::ustring &filename)
void url_show (const Glib::ustring &url) throw (exception)
void wrap_init ()


Typedef Documentation

typedef GnomeVFSFileOffset Gnome::Vfs::FileOffset
 

typedef GnomeVFSFileSize Gnome::Vfs::FileSize
 

typedef Glib::ListHandle<Glib::ustring> Gnome::Vfs::ListHandleStrings
 


Function Documentation

Glib::ustring Gnome::Vfs::escape_host_and_path_string const Glib::ustring &  path  ) 
 

Escapes path, replacing only special characters that would not be found in paths or host name (so '/', '&', '=', ':', '@' and '?' will not be escaped by this function).

Parameters:
path String to be escaped Return value A string equivalent to path but with non-path/host characters escaped

Glib::ustring Gnome::Vfs::escape_path_string const Glib::ustring &  path  ) 
 

Escapes , replacing only special characters that would not be found in paths (so '/', '&', '=', and '?' will not be escaped by this function).

Parameters:
path String to be escaped
Returns:
A string equivalent to path but with non-path characters escaped

Glib::ustring Gnome::Vfs::escape_slashes const Glib::ustring &  unescaped_string  ) 
 

Escapes only '/' and '' characters in , replacing them with their escape sequence equivalents.

Parameters:
unescaped_string String to be escaped
Returns:
A string equivalent to unescaped_string, but with no unescaped '/' or '' characters

Glib::ustring Gnome::Vfs::escape_string const Glib::ustring &  unescaped_string  ) 
 

Escapes , replacing any and all special characters with equivalent escape sequences.

Parameters:
unscaped_string String to be escaped
Returns:
A string equivalent to unescaped_string but with all special characters escaped

Glib::ustring Gnome::Vfs::expand_initial_tilde const Glib::ustring &  path  ) 
 

If path starts with a ~, representing the user's home directory, expand it to the actual path location.

Parameters:
path a local file path which may start with a '~'
Returns:
a newly allocated string with the initial tilde (if there was one) converted to an actual path

Glib::ustring Gnome::Vfs::format_file_size_for_display FileSize  size  ) 
 

Formats the file size passed in sizein a way that is easy for the user to read.

Gives the size in bytes, kilobytes, megabytes or gigabytes, choosing whatever is appropriate.

Parameters:
size 
Returns:
a newly allocated string with the size ready to be shown.

Glib::ustring Gnome::Vfs::get_local_path_from_uri const Glib::ustring &  uri  ) 
 

Create a local path for a file:/// URI.

Do not use with URIs of other methods.

Parameters:
uri URI to convert to a local path
Returns:
a string containing the local path, or an empty string if the uri isn't a file: URI without a fragment identifier (or chained URI).

Glib::ustring Gnome::Vfs::get_uri_from_local_path const Glib::ustring &  local_full_path  ) 
 

Returns a file:/// URI for the local path .

Parameters:
local_full_path A full local filesystem path (i.e. not relative)
Returns:
A string containing the URI corresponding to local_full_path.

void Gnome::Vfs::handle_result GnomeVFSResult  result  )  throw (Gnome::Vfs::exception)
 

Glib::ustring Gnome::Vfs::icon_path_from_filename const Glib::ustring &  filename  ) 
 

void Gnome::Vfs::init  ) 
 

bool Gnome::Vfs::is_executable_command_string const Glib::ustring &  command_string  ) 
 

Checks if command_string starts with the full path of an executable file or an executable in $PATH.

Parameters:
command_string,: 
Returns:
true if command_string started with an executable file, false otherwise.

Glib::ustring Gnome::Vfs::make_path_name_canonical const Glib::ustring &  path  ) 
 

Glib::ustring Gnome::Vfs::make_uri_canonical const Glib::ustring &  uri  ) 
 

gnome_vfs_make_path_name_canonical: : a file path, relative or absolute

Calls _gnome_vfs_canonicalize_pathname, allocating storage for the result and providing for a cleaner memory management.

Returns:
a canonical version of

Glib::ustring Gnome::Vfs::unescape_string const Glib::ustring &  escaped_string,
const Glib::ustring &  illegal_characters = Glib::ustring()
 

Decodes escaped characters (i.e.

PERCENTxx sequences) in escaped_string. Characters are encoded in PERCENTxy form, where xy is the ASCII hex code for character 16x+y.

Parameters:
escaped_string An escaped URI, path, or other string
illegal_characters A string containing a sequence of characters considered "illegal", '' is automatically in this list.
Returns:
A newly allocated string with the unescaped equivalents, or an empty string if escaped_string contained one of the characters in illegal_characters.

Glib::ustring Gnome::Vfs::unescape_string_for_display const Glib::ustring &  escaped_string  ) 
 

Similar to unescape_string(), but it returns something semi-intelligable to a user even upon receiving traumatic input such as 00 or URIs in bad form.

WARNING: You should never use this function on a whole URI! It unescapes reserved characters, and can result in a mangled URI that can not be re-entered. For example, it unescapes "#" "&" and "?", which have special meanings in URI strings.

See also:
unescape_string().
Parameters:
escaped_string The string encoded with escaped sequences.
Returns:
A string with all characters replacing their escaped hex values

void Gnome::Vfs::url_show const Glib::ustring &  url  )  throw (exception)
 

void Gnome::Vfs::wrap_init  ) 
 


Generated on Mon Oct 2 01:01:44 2006 for gnomemm2 by  doxygen 1.4.6