Class sh::filesystem::FilesystemOperationTransfers¶
-
class
sh::filesystem
::
FilesystemOperationTransfers
¶ Used by FilesystemOperation for managing the execution of transfer operations.
This class is only used directly by FilesystemOperation (but some inner class might be interesting).
Public Functions
Constructed only by the infrastructure and made available otherwise.
-
void
executestepqueue
()¶ Executes the queue.
The execution model is as follows: The complete queue of OperationStepClass steps becomes expanded, filesystem conflicts gets resolved and then all steps become executed.
In detail:
At first there is an interleaved process of expanding all steps (see OperationStepClass::expand) and checking/resolving filesystem conflicts in the fresh tree (see doreview). It checks all steps in the queue for conflicts (e.g. destination already exists). It expands each step which has no conflicts (by enqueueing it to the stepqueue). After those checks, it asks FilesystemOperationProgressMonitor::resolveConflicts for a resolution for all outstanding conflicts. With all the steps, which were (or are) in conflict, the entire process becomes repeated. This ends when all steps are expanded and no open conflicts exist anymore.
When this process is done, the execution phase begins. It iterates the queue. It takes the (in FIFO manner) first element (if one is there, otherwise stops). For that step, it makes a late-time conflict check at first. If a conflict appears, it becomes temporarily unexpanded. A resolution loop as above will run for this element, eventually leading to re-expansion. After the check, when no conflicts are open, it executes the step.
adds one move transfer into the queue.
adds one copy transfer into the queue.
-
~FilesystemOperationTransfers
()¶
Private Functions
Adds a move transfer step into given list.
Adds a copy transfer step into given list.
-
void
computeProgress
()¶ Computes the current progress (how many items/bytes are transferred from which total?) and notifies the progress monitor.
-
bool
doreview
(QList<OperationStepClass*> reviewsteps)¶ Makes checks if the given queue has conflicts and for asks
resolveConflicts
how to handle them.For each non-conflicting step, it triggers its expansion, thereby modifying the stepqueue.
It returns when no open conflicts exist.
- Return
If there were any conflicts.
Private Members
-
QList<OperationStepClass*>
stepqueue
¶ The queue of steps for execution.
-
OperationStepClass *
currentstep
= 0¶ The step which is currently in execution (or 0).
-
QList<OperationStepClass*>
donesteps
¶ Steps which were already executed.
-
FilesystemOperation *
filesystem
¶
-
std::shared_ptr<FilesystemOperationProgressMonitor>
progressmon
¶
-
class
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
-
class
OperationStep_ApplyDirectoryDetails
: public 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
-
QList<OperationStepClass*>
expand
()¶ Implement this and handle the expansion part of this step here.
-
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.
-
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
-
QList<QPair<sh::filesystem::DetailColumn*, QVariant>>
_detailvals
¶
-
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
-
class
OperationStep_CopyDirectory
: public 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
-
QList<OperationStepClass*>
expand
()¶ Implement this and handle the expansion part of this step here.
-
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.
-
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.
-
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.
-
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
-
class
OperationStep_CopyFile
: public 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
-
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.
-
bool
hasOwnProgressIncreaseHandling
()¶ If it takes care on its own to signal increases in the transfer progress.
-
QList<OperationStepClass*>
expand
()¶ Implement this and handle the expansion part of this step here.
-
void
_unexpand
(QList<OperationStepClass*> *intlist)¶ Bookkeeping in FilesystemOperationTransfers.
-
void
_expand
(QList<OperationStepClass*> *intlist)¶ Bookkeeping in FilesystemOperationTransfers.
-
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.
-
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
-
class
OperationStep_CopyLink
: public 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
-
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.
-
QList<OperationStepClass*>
expand
()¶ Implement this and handle the expansion part of this step here.
-
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.
-
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.
-
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
-
class
OperationStep_DeleteItem
: public 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
-
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.
-
QList<OperationStepClass*>
expand
()¶ Implement this and handle the expansion part of this step here.
-
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.
-
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.
-
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
-
class
OperationStep_RenameItem
: public 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
-
QList<OperationStepClass*>
expand
()¶ Implement this and handle the expansion part of this step here.
-
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.
-
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
-
class
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
-
QList<OperationStepClass*>
expand
()¶ Implement this and handle the expansion part of this step here.
-
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
-
class
SingleStepMonitor
: public sh::filesystem::FilesystemHandler::HandlerTransfer¶ Used for managing detailled progress changes about a single step.
Public Functions
-
SingleStepMonitor
(OperationStepClass *step)¶
-
void
respectCancel
()¶
-
void
incrementTransferredBytes
(qint64 donebytes)¶
-
~SingleStepMonitor
()¶
-