hudson.util.ssh
Class SFTPClient

java.lang.Object
  extended by com.trilead.ssh2.SFTPv3Client
      extended by hudson.util.ssh.SFTPClient

public class SFTPClient
extends com.trilead.ssh2.SFTPv3Client

Improved SFTPv3Client.

Since:
1.339
Author:
Kohsuke Kawaguchi

Constructor Summary
SFTPClient(com.trilead.ssh2.Connection conn)
           
 
Method Summary
 com.trilead.ssh2.SFTPv3FileAttributes _stat(String path)
          Graceful SFTPv3Client.stat(String) that returns null if the path doesn't exist.
 void chmod(String path, int permissions)
           
 boolean exists(String path)
          Checks if the given path exists.
 void mkdirs(String path, int posixPermission)
          Makes sure that the directory exists, by creating it if necessary.
 InputStream read(String file)
           
 OutputStream writeToFile(String path)
          Creates a new file and writes to it.
 
Methods inherited from class com.trilead.ssh2.SFTPv3Client
canonicalPath, close, closeFile, createFile, createFile, createFileTruncate, createFileTruncate, createSymlink, fsetstat, fstat, getCharset, getProtocolVersion, ls, lstat, mkdir, mv, openFileRO, openFileRW, read, readLink, rm, rmdir, setCharset, setstat, stat, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SFTPClient

public SFTPClient(com.trilead.ssh2.Connection conn)
           throws IOException
Throws:
IOException
Method Detail

exists

public boolean exists(String path)
               throws IOException
Checks if the given path exists.

Overrides:
exists in class com.trilead.ssh2.SFTPv3Client
Throws:
IOException

_stat

public com.trilead.ssh2.SFTPv3FileAttributes _stat(String path)
                                            throws IOException
Graceful SFTPv3Client.stat(String) that returns null if the path doesn't exist.

Overrides:
_stat in class com.trilead.ssh2.SFTPv3Client
Throws:
IOException

mkdirs

public void mkdirs(String path,
                   int posixPermission)
            throws IOException
Makes sure that the directory exists, by creating it if necessary.

Overrides:
mkdirs in class com.trilead.ssh2.SFTPv3Client
Throws:
IOException

writeToFile

public OutputStream writeToFile(String path)
                         throws IOException
Creates a new file and writes to it.

Overrides:
writeToFile in class com.trilead.ssh2.SFTPv3Client
Throws:
IOException

read

public InputStream read(String file)
                 throws IOException
Overrides:
read in class com.trilead.ssh2.SFTPv3Client
Throws:
IOException

chmod

public void chmod(String path,
                  int permissions)
           throws IOException
Overrides:
chmod in class com.trilead.ssh2.SFTPv3Client
Throws:
IOException


Copyright © 2004-2013. All Rights Reserved.