public final class LocalMoveCommand extends org.mule.extension.file.common.api.command.FileCommand<LocalFileSystem> implements org.mule.extension.file.common.api.command.MoveCommand
AbstractLocalCopyCommand which implements the MoveCommand contract| Constructor and Description |
|---|
LocalMoveCommand(LocalFileSystem fileSystem) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(Path source,
Path targetPath,
boolean overwrite,
CopyOption[] options)
Implements recursive moving
|
protected void |
doMkDirs(Path directoryPath)
|
protected void |
execute(String sourcePath,
String target,
boolean overwrite,
boolean createParentDirectory)
Performs the base logic and delegates into
doExecute(Path, Path, boolean, CopyOption[]) to perform the actual
copying logic |
protected boolean |
exists(Path path) |
protected String |
getAction() |
protected Path |
getBasePath(org.mule.extension.file.common.api.FileSystem fileSystem) |
void |
move(org.mule.extension.file.common.api.FileConnectorConfig config,
String sourcePath,
String targetDirectory,
boolean overwrite,
boolean createParentDirectories) |
public LocalMoveCommand(LocalFileSystem fileSystem)
public void move(org.mule.extension.file.common.api.FileConnectorConfig config,
String sourcePath,
String targetDirectory,
boolean overwrite,
boolean createParentDirectories)
move in interface org.mule.extension.file.common.api.command.MoveCommandprotected void doExecute(Path source, Path targetPath, boolean overwrite, CopyOption[] options) throws Exception
source - the path to be copiedtargetPath - the path to the target destinationoverwrite - whether to overwrite existing target pathsoptions - an array of CopyOption which configure the copying operationExceptionprotected String getAction()
protected final void execute(String sourcePath, String target, boolean overwrite, boolean createParentDirectory)
doExecute(Path, Path, boolean, CopyOption[]) to perform the actual
copying logicsourcePath - the path to be copiedtarget - the path to the target destinationoverwrite - whether to overwrite existing target pathscreateParentDirectory - whether to create the target's parent directory if it doesn't existsprotected Path getBasePath(org.mule.extension.file.common.api.FileSystem fileSystem)
getBasePath in class org.mule.extension.file.common.api.command.FileCommand<LocalFileSystem>protected boolean exists(Path path)
exists in class org.mule.extension.file.common.api.command.FileCommand<LocalFileSystem>protected void doMkDirs(Path directoryPath)
doMkDirs in class org.mule.extension.file.common.api.command.FileCommand<LocalFileSystem>directoryPath - a Path pointing to the directory you want to createCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.