Nothing -> giveup "Specify --from or --to"
seek' :: CopyOptions -> FromToHereOptions -> CommandSeek
-seek' o fto = startConcurrend stages $ do
+seek' o fto = startConcurrency (Command.Move.stages fto) $ do
case batchOption o of
NoBatch -> withKeyOptions
(keyOptions o) (autoMode o) seeker
}
keyaction = Command.Move.startKey fto Command.Move.RemoveNever
- stages = case fto of
- FromOrToRemote (FromRemote _) -> commandStages
- FromOrToRemote (ToRemote _) -> commandStages
- ToHere -> commandStages
- FromRemoteToRemote _ _ -> transferStages
-
{- A copy is just a move that does not delete the source file.
- However, auto mode avoids unnecessary copies, and avoids getting or
- sending non-preferred content. -}
Nothing -> giveup "Specify --from or --to"
seek' :: MoveOptions -> FromToHereOptions -> CommandSeek
-seek' o fto = startConcurrency stages $ do
+seek' o fto = startConcurrency (stages fto) $ do
case batchOption o of
NoBatch -> withKeyOptions (keyOptions o) False seeker
(commandAction . keyaction)
FromRemoteToRemote _ _ -> Nothing
, usesLocationLog = True
}
- stages = case fto of
- FromOrToRemote (FromRemote _) -> transferStages
- FromOrToRemote (ToRemote _) -> commandStages
- ToHere -> transferStages
- FromRemoteToRemote _ _ -> transferStages
keyaction = startKey fto (removeWhen o)
ww = WarnUnmatchLsFiles
+stages :: FromToHereOptions -> UsedStages
+stages (FromOrToRemote (FromRemote _)) = transferStages
+stages (FromOrToRemote (ToRemote _)) = commandStages
+stages ToHere = transferStages
+stages (FromRemoteToRemote _ _) = transferStages
+
start :: FromToHereOptions -> RemoveWhen -> SeekInput -> RawFilePath -> Key -> CommandStart
start fromto removewhen si f k = start' fromto removewhen afile si k ai
where