public class

FileSystemFile

extends Object
implements LocalDestFile LocalSourceFile
java.lang.Object
   ↳ net.schmizz.sshj.xfer.FileSystemFile

Summary

Fields
private final File file
protected final Logger log
Public Constructors
FileSystemFile(String path)
FileSystemFile(File file)
Public Methods
boolean equals(Object other)
FileSystemFile getChild(String name)
Iterable<FileSystemFile> getChildren(LocalFileFilter filter)
File getFile()
InputStream getInputStream()
long getLastAccessTime()
Returns last access time for the underlying file.
long getLastModifiedTime()
Returns last access time for the underlying file.
long getLength()
String getName()
OutputStream getOutputStream()
int getPermissions()
Returns the permissions for the underlying file
FileSystemFile getTargetDirectory(String dirname)
Allows caller to express intent that caller expects to write to directory with dirname.
FileSystemFile getTargetFile(String filename)
Allows caller to express intent that caller expects to write to file with filename.
int hashCode()
boolean isDirectory()
boolean isFile()
boolean providesAtimeMtime()
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.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface net.schmizz.sshj.xfer.LocalDestFile
From interface net.schmizz.sshj.xfer.LocalSourceFile

Fields

private final File file

protected final Logger log

Public Constructors

public FileSystemFile (String path)

Parameters
path

public FileSystemFile (File file)

Parameters
file

Public Methods

public boolean equals (Object other)

Parameters
other

public FileSystemFile getChild (String name)

Parameters
name

public Iterable<FileSystemFile> getChildren (LocalFileFilter filter)

Parameters
filter
Throws
IOException

public File getFile ()

public InputStream getInputStream ()

Throws
IOException

public long getLastAccessTime ()

Returns last access time for the underlying file.

Returns
  • time in seconds since Unix epoch
Throws
IOException

public long getLastModifiedTime ()

Returns last access time for the underlying file.

Returns
  • time in seconds since Unix epoch
Throws
IOException

public long getLength ()

public String getName ()

public OutputStream getOutputStream ()

Throws
IOException

public int getPermissions ()

Returns the permissions for the underlying file

Returns
  • permissions e.g. 0644
Throws
IOException

public FileSystemFile getTargetDirectory (String dirname)

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.

Parameters
dirname
Throws
IOException

public FileSystemFile getTargetFile (String filename)

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.

Parameters
filename
Throws
IOException

public int hashCode ()

public boolean isDirectory ()

public boolean isFile ()

public boolean providesAtimeMtime ()

public void setLastAccessedTime (long t)

Set the last access time for the underlying file.

Parameters
t Time in seconds since Unix epoch
Throws
IOException

public void setLastModifiedTime (long t)

Set the last modified time for the underlying file.

Parameters
t Time in seconds since Unix epoch
Throws
IOException

public void setPermissions (int perms)

Set the permissions for the underlying file.

Parameters
perms Permissions e.g. 0644
Throws
IOException

public String toString ()