public class FileSystemFile extends Object implements LocalSourceFile, LocalDestFile
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log |
| Constructor and Description |
|---|
FileSystemFile(File file) |
FileSystemFile(String path) |
| Modifier and Type | Method and Description |
|---|---|
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() |
public FileSystemFile(String path)
public FileSystemFile(File file)
public File getFile()
public String getName()
getName in interface LocalSourceFilepublic boolean isFile()
isFile in interface LocalSourceFilepublic boolean isDirectory()
isDirectory in interface LocalSourceFilepublic long getLength()
getLength in interface LocalSourceFilepublic InputStream getInputStream() throws IOException
getInputStream in interface LocalSourceFileIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in interface LocalDestFileIOExceptionpublic Iterable<FileSystemFile> getChildren(LocalFileFilter filter) throws IOException
getChildren in interface LocalSourceFileIOExceptionpublic boolean providesAtimeMtime()
providesAtimeMtime in interface LocalSourceFilepublic long getLastAccessTime()
throws IOException
LocalSourceFilegetLastAccessTime in interface LocalSourceFileIOExceptionpublic long getLastModifiedTime()
throws IOException
LocalSourceFilegetLastModifiedTime in interface LocalSourceFileIOExceptionpublic int getPermissions()
throws IOException
LocalSourceFilegetPermissions in interface LocalSourceFileIOExceptionpublic void setLastAccessedTime(long t)
throws IOException
LocalDestFilesetLastAccessedTime in interface LocalDestFilet - time in seconds since Unix epochIOExceptionpublic void setLastModifiedTime(long t)
throws IOException
LocalDestFilesetLastModifiedTime in interface LocalDestFilet - time in seconds since Unix epochIOExceptionpublic void setPermissions(int perms)
throws IOException
LocalDestFilesetPermissions in interface LocalDestFileperms - permissions e.g. 0644IOExceptionpublic FileSystemFile getChild(String name)
getChild in interface LocalDestFilename.public FileSystemFile getTargetFile(String filename) throws IOException
LocalDestFilefilename. Based on this
information, an implementation may return an alternate file to write to, which should be respected by the
caller.getTargetFile in interface LocalDestFileIOExceptionpublic FileSystemFile getTargetDirectory(String dirname) throws IOException
LocalDestFiledirname. Based on this
information, an implementation may return an alternate directory to write to, which should be respected by the
caller.getTargetDirectory in interface LocalDestFileIOExceptionCopyright © 2009–2014. All rights reserved.