Class sh::filesystemhandlers::GnomeIOFilesystemHandler

class sh::filesystemhandlers::GnomeIOFilesystemHandler : public sh::filesystem::FilesystemHandler

A filesystem handler for GIO filesystem parts.

This is the abstract base class.

Subclassed by sh::filesystemhandlers::GnomeIODevicesFilesystemHandler, sh::filesystemhandlers::GnomeIOGenericFilesystemHandler, sh::filesystemhandlers::GnomeIONetworkFilesystemHandler, sh::filesystemhandlers::GnomeIOSmbFilesystemHandler

Public Functions

GnomeIOFilesystemHandler()
void itemlist(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, sh::filesystem::FilesystemNodeType type, sh::filesystem::FilesystemNodeListEditor *list)
sh::filesystem::FilesystemNodeType getType(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
qint64 getSize(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
QDateTime getMtime(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void setMtime(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QDateTime time)
QString getMimetype(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
QString getLinkTarget(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
bool canGetFileContent(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
std::shared_ptr<QIODevice> getFileContent(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
bool canCreateDirectory(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void createDirectory(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
bool canCreateLink(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void createLink(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString target)
bool canCreateFile(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void createFile(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QIODevice *content, HandlerTransfer *handlertransfer)
bool canDeleteItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void deleteItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
bool canRenameItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> src)
void renameItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> src, QString destpath)
QList<std::shared_ptr<sh::actions::AbstractActionItem>> getActions(const QList<std::shared_ptr<const sh::filesystem::Eurl>> eurls)
bool requiresResolvedLinks()

Returns if this handler requires to be used by the engine with resolved links.

bool isWellKnownScheme()

Returns if the scheme for this handler is a well known one (which external programs typically would understand).

void itemlist(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, sh::filesystem::FilesystemNodeType type, sh::filesystem::FilesystemNodeListEditor *list) = 0

Determine a list of subelements in a certain directory.

void configureItems(sh::filesystem::Operation *op, QList<std::shared_ptr<FilesystemNode>> nodes)

Configure newly created nodes (e.g. setting another icon or changing the display name).

sh::filesystem::FilesystemNodeType getType(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Determine if a file is regular, or a dir, or a link, …

qint64 getSize(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Determine the size of a file.

QDateTime getMtime(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Determine the mtime of a file.

void setMtime(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QDateTime time) = 0

Set the mtime of a file.

QString getMimetype(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Determine mime type of a file.

QString getLinkTarget(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Resolve a link.

QList<QString> listExtendedAttributes(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)

Fetches the list of available extended attributes for an entry.

quint64 getExtendedAttributeSize(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute)

Returns the site of value for one extended attribute for an entry.

QByteArray getExtendedAttribute(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute)

Returns the value for one extended attribute for an entry.

void setExtendedAttribute(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute, QByteArray value)

Sets the value for one extended attribute for an entry.

void removeExtendedAttribute(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute)

Removes one extended attributes for an entry.

QMap<QString, QString> getCustomAttributes(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)

Returns the custom attributes for an entry.

In contrast to extended attributes, the custom attributes are not directly stored in the filesystem this way, but handle implementation specific aspects (like permissions).

void setCustomAttribute(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute, QString value)

Sets the value for one custom attribute for an entry.

See also getCustomAttributes.

bool canGetFileContent(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Returns if it is allowed to get the content of a certain file.

std::shared_ptr<QIODevice> getFileContent(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Get the content of a file.

bool canCreateDirectory(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Returns if it is allowed to create subdirectories in a certain directory.

void createDirectory(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Create a directory.

bool canCreateLink(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Returns if it is allowed to create a link in a certain directory.

void createLink(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString target) = 0

Create a link.

bool canCreateFile(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Returns if it is allowed to create files in a certain directory.

void createFile(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QIODevice *content, HandlerTransfer *handlertransfer) = 0

Creates a file with some content.

It may use handlertransfer for some better integration, like cancel support and progress monitoring.

bool canDeleteItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Returns if it is allowed to delete a certain file/directory/link/….

void deleteItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Delete a file/directory/link/…

void deleteDirectoryIfEmpty(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)

Deletes a directory only of it is empty.

bool canRenameItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> src) = 0

Returns if it is allowed to rename a certain file, directory, link, … (see renameItem).

void renameItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> src, QString destpath) = 0

Renames an item to another path.

It can be a simple filename change or also changes in the deeper path segments.

QList<std::shared_ptr<sh::actions::AbstractActionItem>> getActions(const QList<std::shared_ptr<const sh::filesystem::Eurl>> eurls) = 0

Returns a list of actions (see former example) for showing for certain files.

void viewEnteredDirectory(std::shared_ptr<const sh::filesystem::Eurl>)

Callback for preparing stuff when the view entered some directory (e.g. for enabling watchers). See also viewLeftDirectory.

void viewLeftDirectory(std::shared_ptr<const sh::filesystem::Eurl>)

Callback for preparing stuff when the view left some directory. See also viewEnteredDirectory.

void search(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, std::function<void(std::shared_ptr<const sh::filesystem::Eurl>, QList<std::shared_ptr<sh::search::SearchCriterion>>, sh::filesystem::FilesystemNodeType ftype)> addfile, std::function<void(std::shared_ptr<const sh::filesystem::Eurl>)> visitdir, QList<std::shared_ptr<sh::search::SearchCriterion>> criteria, )

Helps searching for files.

Override this method with a behavior identical to the default, if a specialized implementation can be much faster than the default one.

void customizeUi(std::shared_ptr<sh::filesystem::FilesystemNode> node, bool *showSearchPanel)

Creates a custom gui, which becomes part of the fileview.

sh::filesystem::FilesystemModel *model()

A convenience shortcut to the sh::filesystem::FilesystemModel (a singleton).

Public Static Functions

QString mountDevice(QString gvolumeuuid, sh::actions::ActionExecutionInfo *info)
QString mountLocation(QString gurl, sh::actions::ActionExecutionInfo *info)
QString unmountLocation(QString gurl, sh::actions::ActionExecutionInfo *info)
QByteArray eurl2gurlb(std::shared_ptr<const sh::filesystem::Eurl> eurl)
QString eurl2gurl(std::shared_ptr<const sh::filesystem::Eurl> eurl)
std::shared_ptr<const sh::filesystem::Eurl> gurl2eurl(QString gurl)
void logIfError(void *error)
void throwIfError(void *error)
class MountOperations

Public Static Functions

void *createMountOperation(sh::actions::ActionExecutionInfo *info, QString address, MountOperationsCallbackData **opdata)
void deleteMountOperation(MountOperationsCallbackData *opdata)

Public Static Attributes

QHash<size_t, MountOperationsCallbackData*> callbackdata
size_t callbackdataindex
QMutex callbackdatamutex
struct MountOperationsCallbackData

Public Functions

MountOperationsCallbackData(sh::actions::ActionExecutionInfo *info, size_t index, void *mountoperation, QString address)

Public Members

sh::actions::ActionExecutionInfo *info
size_t index
void *mountoperation
QString address