Package net.schmizz.sshj.xfer
Interface LocalDestFile
-
- All Known Implementing Classes:
FileSystemFile,InMemoryDestFile
public interface LocalDestFile
-
-
Method Summary
Modifier and Type Method Description LocalDestFilegetChild(java.lang.String name)longgetLength()java.io.OutputStreamgetOutputStream()java.io.OutputStreamgetOutputStream(boolean append)LocalDestFilegetTargetDirectory(java.lang.String dirname)Allows caller to express intent that caller expects to write to directory withdirname.LocalDestFilegetTargetFile(java.lang.String filename)Allows caller to express intent that caller expects to write to file withfilename.voidsetLastAccessedTime(long t)Set the last access time for the underlying file.voidsetLastModifiedTime(long t)Set the last modified time for the underlying file.voidsetPermissions(int perms)Set the permissions for the underlying file.
-
-
-
Method Detail
-
getLength
long getLength()
-
getOutputStream
java.io.OutputStream getOutputStream() throws java.io.IOException- Throws:
java.io.IOException
-
getOutputStream
java.io.OutputStream getOutputStream(boolean append) throws java.io.IOException- Throws:
java.io.IOException
-
getChild
LocalDestFile getChild(java.lang.String name)
- Returns:
- A child file/directory of this directory with given
name.
-
getTargetFile
LocalDestFile getTargetFile(java.lang.String filename) throws java.io.IOException
Allows caller to express intent that caller expects to write to file withfilename. Based on this information, an implementation may return an alternate file to write to, which should be respected by the caller.- Throws:
java.io.IOException
-
getTargetDirectory
LocalDestFile getTargetDirectory(java.lang.String dirname) throws java.io.IOException
Allows caller to express intent that caller expects to write to directory withdirname. Based on this information, an implementation may return an alternate directory to write to, which should be respected by the caller.- Throws:
java.io.IOException
-
setPermissions
void setPermissions(int perms) throws java.io.IOExceptionSet the permissions for the underlying file.- Parameters:
perms- permissions e.g. 0644- Throws:
java.io.IOException
-
setLastAccessedTime
void setLastAccessedTime(long t) throws java.io.IOExceptionSet the last access time for the underlying file.- Parameters:
t- time in seconds since Unix epoch- Throws:
java.io.IOException
-
setLastModifiedTime
void setLastModifiedTime(long t) throws java.io.IOExceptionSet the last modified time for the underlying file.- Parameters:
t- time in seconds since Unix epoch- Throws:
java.io.IOException
-
-