Class SftpClientTask

All Implemented Interfaces:
RequestFuture, Runnable

@Deprecated(forRemoval=true, since="3.1.3") public class SftpClientTask extends Task
Deprecated, for removal: This API element is subject to removal in a future version.
A task that implements an SFTP client. The actual executable code (SftpRunnable) should be passed in the constructor. Deprecated for removal at 3.3.0. There is no need for this call, simply access the SftpClient directly, optionally running in a generic task.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.sshtools.client.tasks.Task

    Task.TaskRunnable<T>
  • Field Summary

    Fields inherited from class com.sshtools.common.ssh.ConnectionAwareTask

    con, lastError
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cd(String dir)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Changes the working directory on the remote server, or the user's default directory if null or any empty string is provided as the directory path.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Change the working directory to the parent directory
    void
    chgrp(String gid, String path)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the group ID for the file or directory.
    void
    chmod(PosixPermissions permissions, String path)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Changes the access permissions or modes of the specified file or directory.
    void
    chown(String uid, String path)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the user ID to owner for the file or directory.
    protected final void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Close the SFTP client.
    static String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Format a String with the details of the file.
    static String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Format a String with the details of the file.
    get(String path)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file to the local computer
    get(String path, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file to the local computer
    get(String path, FileTransferProgress progress)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file to the local computer.
    get(String path, FileTransferProgress progress, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file to the local computer.
    get(String remote, OutputStream local)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file into an OutputStream.
    get(String remote, OutputStream local, long position)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file into an OutputStream.
    get(String remote, OutputStream local, FileTransferProgress progress)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file writing it to the specified OutputStream.
    get(String remote, OutputStream local, FileTransferProgress progress, long position)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file writing it to the specified OutputStream.
    get(String remote, String local)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file into the local file.
    get(String remote, String local, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file into the local file.
    get(String remote, String local, FileTransferProgress progress)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file to the local computer.
    get(String remote, String local, FileTransferProgress progress, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file to the local computer.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the absolute path for a file.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the default directory (or HOME directory)
    int
    getEOL(byte[] nl)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    getEOL(String line)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    getFiles(String remote)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote files to the local computer
    getFiles(String remote, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote files to the local computer
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote files to the local computer.
    getFiles(String remote, FileTransferProgress progress, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote files to the local computer.
    getFiles(String remote, String local)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote files into the local file.
    getFiles(String remote, String local, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote files into the local file.
    getFiles(String remote, String local, FileTransferProgress progress, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Download the remote file to the local computer.
    getInputStream(String remotefile)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create an InputStream for reading a remote file.
    getInputStream(String remotefile, long position)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create an InputStream for reading a remote file.
    getOutputStream(String remotefile)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create an OutputStream for writing to a remote file.
    getRemoteDirectory(String remotedir, String localdir, boolean recurse, boolean sync, boolean commit, FileTransferProgress progress)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Copy the contents of a remote directory to a local directory
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the instance of the AbstractSftpChannel used by this class
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the target path of a symbolic link.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the state of the SFTP client.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Determine whether the file object is pointing to a symbolic link that is pointing to a directory.
    void
    lcd(String path)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Changes the local working directory.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the absolute path to the local working directory.
    ls()
    Deprecated, for removal: This API element is subject to removal in a future version.
    List the contents of the current remote working directory.
    ls(String path)
    Deprecated, for removal: This API element is subject to removal in a future version.
    List the contents remote directory.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Called by getFileMatches() to do regular expression pattern matching on the files in 'remote''s parent directory.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new directory on the remote server.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a directory or set of directories.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    openFile(String fileName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    openFile(String fileName, int flags)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    put(InputStream in, String remote)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload the contents of an InputStream to the remote computer.
    void
    put(InputStream in, String remote, long position)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload the contents of an InputStream to the remote computer.
    void
    put(InputStream in, String remote, FileTransferProgress progress)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload a file to the remote computer reading from the specified InputStream.
    void
    put(InputStream in, String remote, FileTransferProgress progress, long position, long length)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    put(String local)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload a file to the remote computer
    void
    put(String local, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload a file to the remote computer
    void
    put(String local, FileTransferProgress progress)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload a file to the remote computer.
    void
    put(String local, FileTransferProgress progress, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload a file to the remote computer.
    void
    put(String local, String remote)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload a file to the remote computer
    void
    put(String local, String remote, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload a file to the remote computer
    void
    put(String local, String remote, FileTransferProgress progress)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload a file to the remote computer.
    void
    put(String local, String remote, FileTransferProgress progress, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload a file to the remote computer.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload the contents of an InputStream to the remote computer.
    void
    putFiles(String local, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload files to the remote computer
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload files to the remote computer
    void
    putFiles(String local, FileTransferProgress progress, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload files to the remote computer
    void
    putFiles(String local, String remote)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload files to the remote computer
    void
    putFiles(String local, String remote, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload files to the remote computer
    void
    putFiles(String local, String remote, FileTransferProgress progress)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Upload files to the remote computer.
    void
    putFiles(String local, String remote, FileTransferProgress progress, boolean resume)
    Deprecated, for removal: This API element is subject to removal in a future version.
    make local copies of some of the variables, then call putfilematches, which calls "put" on each file that matches the regexp local.
    putLocalDirectory(String localdir, String remotedir, boolean recurse, boolean sync, boolean commit, FileTransferProgress progress)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Copy the contents of a local directory into a remote directory.
    pwd()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the absolute path name of the current remote working directory.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Close the SFTP client.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    rename(String oldpath, String newpath)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Rename a file on the remote computer.
    void
    rm(String path)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Remove a file or directory from the remote computer.
    void
    rm(String path, boolean force, boolean recurse)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Remove a file or directory on the remote computer with options to force deletion of existing files and recursion.
    void
    setBufferSize(int buffersize)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the size of the buffer which is used to read from the local file system.
    void
    setForceRemoteEOL(boolean forceRemoteEOL)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Override automatic detection of the remote EOL (any SFTP version).
    void
    setLocalEOL(int eolMode)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Override the default local system EOL for text mode files.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    sets the type of regular expression matching to perform on gets and puts
    void
    setRemoteEOL(int eolMode)
    Deprecated, for removal: This API element is subject to removal in a future version.
    When connected to servers running SFTP version 3 (or less) the remote EOL type needs to be explicitly set because there is no reliable way for the client to determine the type of EOL for text files.
    void
    setTransferMode(int transferMode)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the transfer mode for current operations.
    stat(String path)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the attributes of the file from the remote computer.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the attributes of the link from the remote computer.
    void
    symlink(String path, String link)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a symbolic link on the remote computer.
    int
    umask(int umask)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the umask used by this client.
    void
    umask(String umask)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the umask for this client.
    boolean
    verifyFiles(String localFile, String remoteFile)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Verify a local and remote file.
    boolean
    verifyFiles(String localFile, String remoteFile, long offset, long length)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Verify a local and remote file.

    Methods inherited from class com.sshtools.client.tasks.Task

    ofRunnable

    Methods inherited from class com.sshtools.common.ssh.ConnectionAwareTask

    getLastError, run

    Methods inherited from class com.sshtools.common.ssh.AbstractRequestFuture

    addFutureListener, done, isDone, isSuccess, waitFor, waitForever

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.sshtools.common.ssh.RequestFuture

    isDoneAndSuccess

    Methods inherited from interface java.lang.Runnable

    run