Package net.schmizz.sshj.xfer
Interface LocalDestFile
-
- All Known Implementing Classes:
FileSystemFile
,InMemoryDestFile
public interface LocalDestFile
-
-
Method Summary
Modifier and Type Method Description LocalDestFile
getChild(java.lang.String name)
java.io.OutputStream
getOutputStream()
LocalDestFile
getTargetDirectory(java.lang.String dirname)
Allows caller to express intent that caller expects to write to directory withdirname
.LocalDestFile
getTargetFile(java.lang.String filename)
Allows caller to express intent that caller expects to write to file withfilename
.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
java.io.OutputStream getOutputStream() 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.IOException
Set the permissions for the underlying file.- Parameters:
perms
- permissions e.g. 0644- Throws:
java.io.IOException
-
setLastAccessedTime
void setLastAccessedTime(long t) throws java.io.IOException
Set 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.IOException
Set the last modified time for the underlying file.- Parameters:
t
- time in seconds since Unix epoch- Throws:
java.io.IOException
-
-