Package adams.core.io
Interface FileObject
-
- All Superinterfaces:
Comparable<FileObject>
,Serializable
- All Known Implementing Classes:
FtpFileObject
,LocalFileObject
,SftpFileObject
,SmbFileObject
public interface FileObject extends Serializable, Comparable<FileObject>
Interface for wrappers around files to avoid costly API calls by caching values also abstracting file representation.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description File
getActualFile()
Returns the actual target (if possible) in case of a link.File
getFile()
Returns the wrapped file.Date
getLastModified()
Returns the date when the file was last modified.long
getLength()
Returns the size of the file.String
getName()
Returns the file name.boolean
isDirectory()
Returns whether the file represents a directory.boolean
isHidden()
Returns whether the file is hidden.boolean
isLink()
Returns whether the file represents a link.boolean
isLocal()
Returns whether the file is a local file.String
toString()
Returns just the file's string representation.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
getFile
File getFile()
Returns the wrapped file.- Returns:
- the file
-
getActualFile
File getActualFile()
Returns the actual target (if possible) in case of a link.- Returns:
- the actual file
-
getName
String getName()
Returns the file name.- Returns:
- the name
-
getLength
long getLength()
Returns the size of the file.- Returns:
- the size
-
isDirectory
boolean isDirectory()
Returns whether the file represents a directory.- Returns:
- true if directory
-
getLastModified
Date getLastModified()
Returns the date when the file was last modified.- Returns:
- date when last modified
-
isHidden
boolean isHidden()
Returns whether the file is hidden.- Returns:
- true if hidden
-
isLink
boolean isLink()
Returns whether the file represents a link.- Returns:
- true if link
-
isLocal
boolean isLocal()
Returns whether the file is a local file.- Returns:
- true if local
-
-