public interface FileRepresentation
This is an interface to work with data as a file/folder. Replicates set of methods of java.io.File. The implementation can be mapped to the real file on disk or to the data in RAM which is represented as a file/directory by the implementation. Depending on implementation it works with a real file on disk or with a virtual file in RAM. To create an implementation, use FilePathRepresentationFactory. Implementation of this interface depends of implementation of the factory. Real implementation must correspond to real implementation of PathRepresentation.
Type Params | Return Type | Name and description |
---|---|---|
|
public boolean |
createNewFile() |
|
public boolean |
delete() |
|
public boolean |
exists() |
|
public FilePathRepresentationFactory |
factory() |
|
public FileRepresentation |
getAbsoluteFile() |
|
public java.lang.String |
getAbsolutePath() |
|
public java.lang.String |
getName() |
|
public java.io.InputStream |
inputStream() |
|
public boolean |
isDirectory() |
|
public boolean |
isFile() |
|
public java.lang.String[] |
list() |
|
public FileRepresentation[] |
listFiles(FileRepresentationFilter filter) |
|
public boolean |
mkdir() |
|
public java.io.OutputStream |
outputStream() |
|
public java.io.Reader |
reader() |
|
public PathRepresentation |
toPath() |