net.schmizz.sshj.xfer
Interface LocalDestFile

All Known Implementing Classes:
FileSystemFile, InMemoryDestFile

public interface LocalDestFile


Method Summary
 LocalDestFile getChild(String name)
           
 OutputStream getOutputStream()
           
 LocalDestFile getTargetDirectory(String dirname)
          Allows caller to express intent that caller expects to write to directory with dirname.
 LocalDestFile getTargetFile(String filename)
          Allows caller to express intent that caller expects to write to file with filename.
 void setLastAccessedTime(long t)
          Set the last access time for the underlying file.
 void setLastModifiedTime(long t)
          Set the last modified time for the underlying file.
 void setPermissions(int perms)
          Set the permissions for the underlying file.
 

Method Detail

getOutputStream

OutputStream getOutputStream()
                             throws IOException
Throws:
IOException

getChild

LocalDestFile getChild(String name)
Returns:
A child file/directory of this directory with given name.

getTargetFile

LocalDestFile getTargetFile(String filename)
                            throws IOException
Allows caller to express intent that caller expects to write to file with filename. Based on this information, an implementation may return an alternate file to write to, which should be respected by the caller.

Throws:
IOException

getTargetDirectory

LocalDestFile getTargetDirectory(String dirname)
                                 throws IOException
Allows caller to express intent that caller expects to write to directory with dirname. Based on this information, an implementation may return an alternate directory to write to, which should be respected by the caller.

Throws:
IOException

setPermissions

void setPermissions(int perms)
                    throws IOException
Set the permissions for the underlying file.

Parameters:
perms - permissions e.g. 0644
Throws:
IOException

setLastAccessedTime

void setLastAccessedTime(long t)
                         throws IOException
Set the last access time for the underlying file.

Parameters:
t - time in seconds since Unix epoch
Throws:
IOException

setLastModifiedTime

void setLastModifiedTime(long t)
                         throws IOException
Set the last modified time for the underlying file.

Parameters:
t - time in seconds since Unix epoch
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.