Package net.schmizz.sshj.xfer
Interface LocalDestFile
- All Known Implementing Classes:
FileSystemFile
,InMemoryDestFile
public interface LocalDestFile
-
Method Summary
Modifier and TypeMethodDescriptionlong
getOutputStream
(boolean append) getTargetDirectory
(String dirname) Allows caller to express intent that caller expects to write to directory withdirname
.getTargetFile
(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 Details
-
getLength
long getLength() -
getOutputStream
- Throws:
IOException
-
getOutputStream
- Throws:
IOException
-
getChild
- Returns:
- A child file/directory of this directory with given
name
.
-
getTargetFile
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:
IOException
-
getTargetDirectory
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:
IOException
-
setPermissions
Set the permissions for the underlying file.- Parameters:
perms
- permissions e.g. 0644- Throws:
IOException
-
setLastAccessedTime
Set the last access time for the underlying file.- Parameters:
t
- time in seconds since Unix epoch- Throws:
IOException
-
setLastModifiedTime
Set the last modified time for the underlying file.- Parameters:
t
- time in seconds since Unix epoch- Throws:
IOException
-