public class ScpHelper extends Object
putDirectory(...)
for more info on bulk directory upload.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SSH_PORT |
static char |
PATH_SEPARATOR |
Constructor and Description |
---|
ScpHelper(CommandExecutor executor) |
Modifier and Type | Method and Description |
---|---|
void |
createRemoteDirectories(String path,
RepositoryPermissions permissions) |
static void |
createZip(List<String> files,
File zipName,
File basedir) |
List<String> |
getFileList(String destinationDirectory,
Repository repository) |
protected static String |
getPath(String basedir,
String dir) |
static File |
getPrivateKey(AuthenticationInfo authenticationInfo) |
static Resource |
getResource(String resourceName) |
static String |
getResourceDirectory(String resourceName) |
static String |
getResourceFilename(String r) |
void |
putDirectory(Wagon wagon,
File sourceDirectory,
String destinationDirectory)
Put a whole directory content, by transferring a unique zip file and uncompressing it
on the target ssh server with
unzip command. |
boolean |
resourceExists(String resourceName,
Repository repository) |
public static final char PATH_SEPARATOR
public static final int DEFAULT_SSH_PORT
public ScpHelper(CommandExecutor executor)
public static File getPrivateKey(AuthenticationInfo authenticationInfo) throws FileNotFoundException
FileNotFoundException
public static void createZip(List<String> files, File zipName, File basedir) throws IOException
IOException
public void putDirectory(Wagon wagon, File sourceDirectory, String destinationDirectory) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
unzip
command.public List<String> getFileList(String destinationDirectory, Repository repository) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
public boolean resourceExists(String resourceName, Repository repository) throws TransferFailedException, AuthorizationException
public void createRemoteDirectories(String path, RepositoryPermissions permissions) throws CommandExecutionException
CommandExecutionException
Copyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.