|
gio-qt 0.0.16
|


Signals | |
| void | createFileIteratorReady (QExplicitlySharedDataPointer< DGioFileIterator > iter) |
| void | mountEnclosingVolumeReady (bool result, QString msg) |
Public Member Functions | |
| DGioFile (Gio::File *gmmFilePtr, QObject *parent=nullptr) | |
| QString | basename () const |
| Gets the base name (the last component of the path) of the DGioFile. | |
| QString | path () const |
| Gets the local pathname of the DGioFile, if one exists. | |
| QString | uri () const |
| QExplicitlySharedDataPointer< DGioFileInfo > | createFileInfo (QString attr="*", DGioFileQueryInfoFlags queryInfoFlags=FILE_QUERY_INFO_NONE, unsigned long timeout_msec=ULONG_MAX) |
| Gets the requested information about the file. | |
| QExplicitlySharedDataPointer< DGioFileInfo > | createFileSystemInfo (QString attr="*") |
| Obtains information about the filesystem the file is on. | |
| QExplicitlySharedDataPointer< DGioFileIterator > | createFileIterator (QString attr="*", DGioFileQueryInfoFlags queryInfoFlags=FILE_QUERY_INFO_NONE) |
| Gets the requested information about the files in a directory. | |
| void | createFileIteratorAsync (QString attr="*", DGioFileQueryInfoFlags queryInfoFlags=FILE_QUERY_INFO_NONE) |
| void | mountEnclosingVolume (DGioMountOperation *dgioMountOperation) |
| QExplicitlySharedDataPointer< DGioMount > | findEnclosingMount () |
Static Public Member Functions | |
| static DGioFile * | createFromPath (QString path, QObject *parent=nullptr) |
| Create a DGioFile instance by given path. | |
| static DGioFile * | createFromUri (QString uri, QObject *parent=nullptr) |
| Create a DGioFile instance by given uri. | |
| static DGioFile * | createFromCmdArg (QString uri, QObject *parent=nullptr) |
| Create a DGioFile instance for a given argument from the command line. | |
| QString DGioFile::basename | ( | ) | const |
Gets the base name (the last component of the path) of the DGioFile.
Wrapper of Gio::File::get_basename(), normally return filename with suffix (without path).
If called for the top level of a system (such as the filesystem root or a uri like sftp://host/) it will return a single directory separator (and on Windows, possibly a drive letter).
If you want to use filenames in a user interface you should use DGioFileInfo::displayName() instead.
| QExplicitlySharedDataPointer< DGioFileInfo > DGioFile::createFileInfo | ( | QString | attr = "*", |
| DGioFileQueryInfoFlags | queryInfoFlags = FILE_QUERY_INFO_NONE, | ||
| unsigned long | timeout_msec = ULONG_MAX ) |
Gets the requested information about the file.
Wrapper of Gio::File::query_info(const std::string& attributes = "*", FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE).
| QExplicitlySharedDataPointer< DGioFileIterator > DGioFile::createFileIterator | ( | QString | attr = "*", |
| DGioFileQueryInfoFlags | queryInfoFlags = FILE_QUERY_INFO_NONE ) |
Gets the requested information about the files in a directory.
Wrapper of Gio::File::enumerate_children()
The attribute value is a string that specifies the file attributes that should be gathered. It is not an error if its not possible to read a particular requested attribute from a file, it just won't be set. attribute should be a comma-separated list of attribute or attribute wildcards. The wildcard "*" means all attributes, and a wildcard like "standard::*" means all attributes in the standard namespace. An example attribute query be "standard::*,owner::user". The standard attributes are available as defines, like FILE_ATTRIBUTE_STANDARD_NAME.
| attr | An attribute query string. |
| queryInfoFlags |
| QExplicitlySharedDataPointer< DGioFileInfo > DGioFile::createFileSystemInfo | ( | QString | attr = "*" | ) |
Obtains information about the filesystem the file is on.
Wrapper of Gio::File::query_filesystem_info("filesystem::*").
|
static |
Create a DGioFile instance for a given argument from the command line.
The value of arg can be either a URI, an absolute path or a relative path resolved relative to the current working directory. This operation never fails, but the returned object might not support any I/O operation if arg points to a malformed path.
| arg | A string containing either a URI, a relative or absolute path. |
|
static |
Create a DGioFile instance by given path.
This operation never fails since Gio::File::create_for_path never fails, but the returned object might not support any I/O operation if path is malformed.
Caller take the ownership of the created object, you can also provide a parent object.
|
static |
Create a DGioFile instance by given uri.
This operation never fails since Gio::File::create_for_uri never fails, but the returned object might not support any I/O operation if uri is malformed.
Caller take the ownership of the created object, you can also provide a parent object.
| QString DGioFile::path | ( | ) | const |
Gets the local pathname of the DGioFile, if one exists.
Wrapper of Gio::File::get_path(). For local file it gets the local pathname with filename included, for filesystem it gets the mount point path.
If valid, this is guaranteed to be an absolute, canonical path. It might contain symlinks.