org.apache.ivy.plugins.repository.sftp

Class SFTPRepository

public class SFTPRepository extends AbstractSshBasedRepository

SFTP Repository, allow to use a repository accessed by sftp protocol. It supports all operations: get, put and list. It relies on jsch for sftp handling, and thus is compatible with sftp version 0, 1, 2 and 3
Constructor Summary
SFTPRepository()
Method Summary
voidget(String source, File destination)
protected StringgetRepositoryScheme()
ResourcegetResource(String source)
Listlist(String parent)
InputStreamopenStream(SFTPResource resource)
voidput(File source, String destination, boolean overwrite)
ResourceresolveResource(String path)
This method is similar to getResource, except that the returned resource is fully initialized (resolved in the sftp repository), and that the given string is a full remote path

Constructor Detail

SFTPRepository

public SFTPRepository()

Method Detail

get

public void get(String source, File destination)

getRepositoryScheme

protected String getRepositoryScheme()

getResource

public Resource getResource(String source)

list

public List list(String parent)

openStream

public InputStream openStream(SFTPResource resource)

put

public void put(File source, String destination, boolean overwrite)

resolveResource

public Resource resolveResource(String path)
This method is similar to getResource, except that the returned resource is fully initialized (resolved in the sftp repository), and that the given string is a full remote path

Parameters: path the full remote path in the repository of the resource

Returns: a fully initialized resource, able to answer to all its methods without needing any further connection