Class sh::scripting::api::ApiFilesystemHandler¶
-
class
sh::scripting::api
::
ApiFilesystemHandler
: public sh::filesystem::FilesystemHandler¶ Public Functions
-
ApiFilesystemHandler
(sh::filesystem::FilesystemModel *model)¶
Determine a list of subelements in a certain directory.
Configure newly created nodes (e.g. setting another icon or changing the display name).
Determine if a file is regular, or a dir, or a link, …
Determine the size of a file.
Determine the mtime of a file.
Set the mtime of a file.
Determine mime type of a file.
Resolve a link.
Fetches the list of available extended attributes for an entry.
Returns the site of value for one extended attribute for an entry.
Returns the value for one extended attribute for an entry.
Sets the value for one extended attribute for an entry.
Removes one extended attributes for an entry.
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).
Sets the value for one custom attribute for an entry.
See also getCustomAttributes.
Returns if it is allowed to get the content of a certain file.
Get the content of a file.
Returns if it is allowed to create subdirectories in a certain directory.
Create a directory.
Returns if it is allowed to create a link in a certain directory.
Create a link.
Returns if it is allowed to create files in a certain directory.
Creates a file with some content.
It may use
handlertransfer
for some better integration, like cancel support and progress monitoring.
Returns if it is allowed to delete a certain file/directory/link/….
Delete a file/directory/link/…
Deletes a directory only of it is empty.
Returns if it is allowed to rename a certain file, directory, link, … (see renameItem).
Renames an item to another path.
It can be a simple filename change or also changes in the deeper path segments.
Returns a list of actions (see former example) for showing for certain files.
-
bool
requiresResolvedLinks
()¶ Returns if this handler requires to be used by the engine with resolved links.
Callback for preparing stuff when the view entered some directory (e.g. for enabling watchers). See also viewLeftDirectory.
Callback for preparing stuff when the view left some directory. See also viewEnteredDirectory.
-
bool
isWellKnownScheme
()¶ Returns if the scheme for this handler is a well known one (which external programs typically would understand).
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.
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 Members
-
std::function<int(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)>
_getType
¶
-
std::function<qint64(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)>
_getSize
¶
-
std::function<double(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)>
_getMtime
¶
-
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, double)>
_setMtime
¶
-
std::function<QString(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)>
_getLinkTarget
¶
-
std::function< QList< QString >sh::filesystem::Operation *op, std::shared_ptr< sh::filesystem::Eurl > eurl)> _listExtendedAttributes
-
std::function<quint64(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QString attribute)>
_getExtendedAttributeSize
¶
-
std::function<QByteArray(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QString attribute)>
_getExtendedAttribute
¶
-
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QString attribute, QByteArray value)>
_setExtendedAttribute
¶
-
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QString attribute)>
_removeExtendedAttribute
¶
-
std::function< QList< QString >sh::filesystem::Operation *op, std::shared_ptr< sh::filesystem::Eurl > eurl)> _getCustomAttributes
-
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QString attribute, QString value)>
_setCustomAttribute
¶
-
std::function<QString(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)>
_getMimetype
¶
-
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)>
_canCreateDirectory
¶
-
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)>
_createDirectory
¶
-
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)>
_canCreateLink
¶
-
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QString target)>
_createLink
¶
-
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)>
_canCreateFile
¶
-
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)>
_canDeleteItem
¶
-
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)>
_deleteItem
¶
-
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> src)>
_canRenameItem
¶
-
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> src, QString destpath)>
_renameItem
¶
-
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, int type, sh::filesystem::FilesystemNodeListEditor *list)>
_itemlist
¶
-
std::function<void(sh::filesystem::Operation *op, QList<std::shared_ptr<sh::filesystem::FilesystemNode>>)>
_configureItems
¶
-
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)>
_canGetFileContent
¶
-
std::function< std::shared_ptr< QIODevice >sh::filesystem::Operation *op, std::shared_ptr< sh::filesystem::Eurl > eurl)> _getFileContent
-
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QIODevice *content, HandlerTransfer *handlertransfer)>
_createFile
¶
-
std::function< QList< std::shared_ptr< sh::actions::AbstractActionItem > >QList< std::shared_ptr< sh::filesystem::Eurl > > eurls)> _getActions
-