hudson.plugins.sshslaves
Class SFTPClient

java.lang.Object
  extended by com.trilead.ssh2.SFTPv3Client
      extended by hudson.plugins.sshslaves.SFTPClient

public class SFTPClient
extends com.trilead.ssh2.SFTPv3Client

TODO: moved to Hudson core, so pick it up from there.

Author:
Kohsuke Kawaguchi

Constructor Summary
SFTPClient(com.trilead.ssh2.Connection conn)
           
 
Method Summary
 com.trilead.ssh2.SFTPv3FileAttributes _stat(java.lang.String path)
          Graceful SFTPv3Client.stat(String) that returns null if the path doesn't exist.
 void chmod(java.lang.String path, int permissions)
           
 boolean exists(java.lang.String path)
          Checks if the given path exists.
 void mkdirs(java.lang.String path, int posixPermission)
          Makes sure that the directory exists, by creating it if necessary.
 java.io.InputStream read(java.lang.String file)
           
 java.io.OutputStream writeToFile(java.lang.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 java.io.IOException
Throws:
java.io.IOException
Method Detail

exists

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

Throws:
java.io.IOException

_stat

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

Throws:
java.io.IOException

mkdirs

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

Throws:
java.io.IOException

writeToFile

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

Throws:
java.io.IOException

read

public java.io.InputStream read(java.lang.String file)
                         throws java.io.IOException
Throws:
java.io.IOException

chmod

public void chmod(java.lang.String path,
                  int permissions)
           throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2010. All Rights Reserved.