Class sh::filesystem::FilesystemOperation¶
-
class
sh::filesystem
::
FilesystemOperation
¶ A high-level interface for filesystem operations.
It is always based on the transaction of a Operation instance (which also gives you access to a FilesystemOperation object).
Some calls optionally allow to give an own instance of sh::filesystem::FilesystemOperationProgressMonitor for some additional functionality. Please note that not all calls provide all those functionality (some do not use e.g. the conflict resolution at all). If not provided, a default behavior is applied.
Public Functions
-
FilesystemOperation
(sh::filesystem::Operation *operation)¶ Constructed only by the infrastructure and made available otherwise.
Gets a list of shallot.sh::filesystem::FilesystemNode nodes in a directory (optionally filter by given types).
Gets the shallot.sh::filesystem::FilesystemNodeType node type for an entry.
Gets the file size for an entry.
Gets the link target for an entry (if it is a link).
Can we get the file content for an entry?
Gets the file content for an entry as QIODevice.
Can we create a given directory?
Creates a directory.
- Parameters
progressmon
: An optional progress monitor.
Can we create a given link?
Creates a link.
- Parameters
progressmon
: An optional progress monitor.
Can we create a given file?
Creates a file.
- Parameters
progressmon
: An optional progress monitor.
Can we delete a given entry?
Delete an entry.
- Parameters
progressmon
: An optional progress monitor.
Delete a directory entry if empty.
- Parameters
progressmon
: An optional progress monitor.
Checks if it is allowed to move a certain item.
If the destination is known as well, it might help to pass it as well.
This does not guarantee success in the transfer, but is just a cheap early check.
Moves entries.
- Parameters
dest
: The requested new common parent directory.progressmon
: An optional progress monitor.
Moves an entry.
- Parameters
dest
: The new location (not the new parent).progressmon
: An optional progress monitor.
Checks if it is allowed to copy a certain item.
If the destination is known as well, it might help to pass it as well.
This does not guarantee success in the transfer, but is just a cheap early check.
Copies entries.
- Parameters
dest
: The requested new common parent directory.progressmon
: An optional progress monitor.
Copies an entry.
- Parameters
dest
: The new location (not the new parent).progressmon
: An optional progress monitor.
Resolve a link as node with or without recursion.
Resolve a link as sh::filesystem::Eurl with or without recursion.
Public Static Functions
Registers a detail column for transferring it when file transfer take place.
- Parameters
index
: An integer which controls the order of transferring.
-
QList<std::shared_ptr<sh::filesystem::DetailColumn>>
transferrableDetailColumns
()¶ A list of all detail columns which are registered becoming transferred in file transfers.
Private Functions
Private Static Attributes
-
QMap<int, std::shared_ptr<sh::filesystem::DetailColumn>>
_detailColumnsMap
¶
-
QList<std::shared_ptr<sh::filesystem::DetailColumn>>
_detailColumns
¶
-
QMutex
_detailColumnsMutex
¶
Friends
- friend class FilesystemOperationTransfers
-
class
MyHandlerTransfer
: public sh::filesystem::FilesystemHandler::HandlerTransfer¶ Public Functions
-
MyHandlerTransfer
(sh::filesystem::FilesystemOperationProgressMonitor *progressmon = 0)¶
-
~MyHandlerTransfer
()¶
-
void
respectCancel
()¶
-
void
incrementTransferredBytes
(qint64 donebytes)¶
Private Members
-
sh::filesystem::FilesystemOperationProgressMonitor *
_progressmon
¶
-
-