gio-qt 0.0.16
Loading...
Searching...
No Matches
DGioFileInfo Class Reference
Inheritance diagram for DGioFileInfo:
Collaboration diagram for DGioFileInfo:

Public Member Functions

 DGioFileInfo (Gio::FileInfo *gmmFileInfoInfoPtr, QObject *parent=nullptr)
QString displayName () const
 Gets a display name for a file.
DGioFileType fileType () const
 DGioFileInfo::fileType.
quint64 fileSize () const
 DGioFileInfo::fileSize.
QString contentType () const
 get the file content type (MimeType).
QString iconString () const
 DGioFileInfo::iconString.
QStringList themedIconNames () const
bool fsReadOnly () const
quint64 fsTotalBytes () const
quint64 fsUsedBytes () const
quint64 fsFreeBytes () const
QString fsType () const

Member Function Documentation

◆ contentType()

QString DGioFileInfo::contentType ( ) const

get the file content type (MimeType).

Wrapper of Gio::FileInfo::get_content_type()

Returns
a single MimeType of the file, such as "text/plain".

◆ displayName()

QString DGioFileInfo::displayName ( ) const

Gets a display name for a file.

A display name is guaranteed to be in UTF8 and can thus be displayed in the UI.

Wrapper of Gio::FileInfo::get_display_name(), internally it returns the G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute value.

◆ fileSize()

quint64 DGioFileInfo::fileSize ( ) const

DGioFileInfo::fileSize.

Wrapper of Gio::FileInfo::get_size()

Returns
the file size in bytes.

◆ fileType()

DGioFileType DGioFileInfo::fileType ( ) const

DGioFileInfo::fileType.

Wrapper of Gio::FileInfo::get_file_type(), internally it returns the G_FILE_ATTRIBUTE_STANDARD_TYPE attribute value.

Returns

◆ iconString()

QString DGioFileInfo::iconString ( ) const

DGioFileInfo::iconString.

Wrapper of Gio::FileInfo::get_icon() and then Gio::Icon::to_string().

Notice the returned value can be in two different forms:

  • a native path (such as "/path/to/my icon.png") without escaping if the file for icon is a native file. If the file is not native, the returned string is the result of g_file_get_uri() (such as "sftp://path/to/my%20icon.png").
  • a icon name if icon is a ThemedIcon with exactly one name, the encoding is simply the name (such as network-server), or a list of theme names (such as ". GThemedIcon text-plain text-x-generic text-plain-symbolic").
Returns
the icon string as described above.

The documentation for this class was generated from the following files: