Class sh::filesystem::FilesystemOperationTransfers::OperationStepΒΆ
-
class
sh::filesystem::FilesystemOperationTransfers
::
OperationStep
One step of execution in a transfer operation by FilesystemOperation.
It is typically about a certain source and destination in the filesystem. It also can stay in conflict (due to checks from FilesystemOperationTransfers::doreview) and provides methods for resolving them (in FilesystemOperationTransfers::FilesystemOperationProgressMonitor::resolveConflicts).
Different subclasses implement distinct kinds of operations (e.g. copying or deleting).
Subclassed by sh::filesystem::FilesystemOperationTransfers::OperationStepClass
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
Constructed only by the infrastructure and made available otherwise.
-
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.
-
~OperationStep
()
Friends
- friend class FilesystemOperationTransfers
-
enum