Class sh::filesystem::FilesystemOperationTransfers::OperationStepClassΒΆ
-
class
sh::filesystem::FilesystemOperationTransfers
::
OperationStepClass
: public sh::filesystem::FilesystemOperationTransfers::OperationStep A base class for all implementations.
They are used from inside FilesystemOperationTransfers::executestepqueue.
Subclassed by sh::filesystem::FilesystemOperationTransfers::OperationStep_ApplyDirectoryDetails, sh::filesystem::FilesystemOperationTransfers::OperationStep_CopyDirectory, sh::filesystem::FilesystemOperationTransfers::OperationStep_CopyFile, sh::filesystem::FilesystemOperationTransfers::OperationStep_CopyLink, sh::filesystem::FilesystemOperationTransfers::OperationStep_DeleteItem, sh::filesystem::FilesystemOperationTransfers::OperationStep_RenameItem
Public Types
-
enum
ConflictResolution
Enumeration of ways how to resolve a filesystem conflict.
Values:
-
enumerator
Skip
Skip this element.
-
enumerator
OverwriteDestination
Overwrite the destination.
-
enumerator
RenameDestinationBefore
Rename the file at the destination before transferring.
-
enumerator
UseDifferentDestinationName
Transfer to another destination filename.
-
enumerator
MergeDirectories
Merge source into destination directory (recursively).
-
enumerator
Unresolved
No strategy.
-
enumerator
Indirect
Indirectly solved. Only set by the engine.
-
enumerator
Public Functions
-
void
execute
(Operation *op) = 0 Implement this and handle the execution part of this step here.
-
QList<OperationStepClass*>
expand
() Implement this and handle the expansion part of this step here.
-
bool
checkconflicts
(Operation *op) Implement this for customizing the conflict checking.
-
bool
hasOwnProgressIncreaseHandling
() If it takes care on its own to signal increases in the transfer progress.
-
void
_unexpand
(QList<OperationStepClass*> *intlist) Bookkeeping in FilesystemOperationTransfers.
-
void
_expand
(QList<OperationStepClass*> *intlist) Bookkeeping in FilesystemOperationTransfers.
-
~OperationStepClass
()
-
QString
conflictDescription
() The description of the conflict (if any) as text.
-
ConflictResolution
conflictResolution
() The currently chosen conflict resolution.
-
QString
conflictResolution_renameDestinationBeforeTo
() Returns new destination name (if current conflict resolution is ConflictResolution::RenameDestinationBefore).
-
QString
conflictResolution_differentDestinationNameTo
() Returns new destination name (if current conflict resolution is ConflictResolution::UseDifferentDestinationName).
-
std::shared_ptr<const sh::filesystem::Eurl>
source
() Returns the source location to be transferred (if specified).
-
std::shared_ptr<const sh::filesystem::Eurl>
originalDestination
() Returns the destination location (if specified).
This is the complete target path, never the parent directory of the new element.
This is the original destination location. See also effectiveDestination.
-
std::shared_ptr<const sh::filesystem::Eurl>
effectiveDestination
() Returns the real destination location with conflict resolution applied.
-
int
sourcetype
() Returns the node type of the source.
Should be overwritten in subclasses whenever it can determine the source type faster than the infrastructure.
-
void
setConflictResolve_Skip
() Set conflict resolution to ConflictResolution::Skip.
-
void
setConflictResolve_OverwriteDestination
() Set conflict resolution to ConflictResolution::OverwriteDestination.
-
void
setConflictResolve_RenameDestinationBefore
(QString newname) Set conflict resolution to ConflictResolution::RenameDestinationBefore.
-
void
setConflictResolve_UseDifferentDestinationName
(QString newname) Set conflict resolution to ConflictResolution::UseDifferentDestinationName.
-
void
setConflictResolve_MergeDirectories
() Set conflict resolution to ConflictResolution::MergeDirectories.
See also setConflictResolve_MergeDirectories_isAllowed.
-
bool
setConflictResolve_MergeDirectories_checkAllowed
() Checks if conflict resolution ConflictResolution::MergeDirectories is allowed.
Public Members
-
quint64
_cntItems
= 0 Number of items to be transferred in this step (used for progress monitoring).
-
quint64
_cntBytes
= 0 Number of byte to be transferred in this step (used for progress monitoring).
-
bool
_isExpanded
= false Bookkeeping in FilesystemOperationTransfers.
-
QList<OperationStepClass*>
_expandnodes
Bookkeeping in FilesystemOperationTransfers.
-
OperationStepClass *
_parentnode
= 0 Bookkeeping in FilesystemOperationTransfers.
-
bool
_deleteonunexpand
= true Bookkeeping in FilesystemOperationTransfers.
-
QList<OperationStepClass*>
_withExpansion
-
enum