| Constructor and Description |
|---|
FileSource(File file)
Default contructor for this object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(Path path)
Check if we can read on this VfsSource.
|
boolean |
canWrite(Path path)
Check if we can write on this VfsSource.
|
boolean |
createNewFile(Path path)
Create a new file.
|
boolean |
delete(Path path)
Delete a file.
|
boolean |
exists(Path path)
Check if the VfsSource exist really.
|
boolean |
isDirectory(Path path)
Check if the VfsSource is a directory
|
boolean |
isFile(Path path)
Check if the VfsSource is a file.
|
String[] |
list(Path path)
Return String Array with the names of files and folder that they exist in
this path attribute.
|
boolean |
mkdir(Path path)
Create a new directory.
|
InputStream |
openForRead(Path path)
Return InputStream object, then we can read the files.
|
OutputStream |
openForWrite(Path path)
Return OutputStream object, then we can write the file.
|
void |
search(GlobExpr globExpr,
File pathFile,
Path path,
List<Path> files)
Search for all the files that match the globExpr provided.
|
List<Path> |
search(GlobExpr globExpr,
Path path)
This method we utilized it when we want to search any file inside of the
path
|
public FileSource(File file) throws IOException
file - The file for this VFS source object.IOException - If any IO occurs.public boolean isDirectory(Path path)
VfsSourceisDirectory in interface VfsSourcepath - The path attributepublic boolean isFile(Path path)
VfsSourcepublic boolean exists(Path path)
VfsSourcepublic boolean canWrite(Path path)
VfsSourcepublic boolean canRead(Path path)
VfsSourcepublic String[] list(Path path)
VfsSourcepublic InputStream openForRead(Path path)
VfsSourceopenForRead in interface VfsSourcepath - The path attributepublic OutputStream openForWrite(Path path)
VfsSourceopenForWrite in interface VfsSourcepath - The path attributepublic List<Path> search(GlobExpr globExpr, Path path)
VfsSourcepublic void search(GlobExpr globExpr, File pathFile, Path path, List<Path> files)
globExpr - The glob expr provided.pathFile - The path under witch the search must start.path - The path that needs to prefix all paths resulting from this search.files - The resulting paths for the search.public boolean createNewFile(Path path)
VfsSourcecreateNewFile in interface VfsSourcepath - The path attributepublic boolean mkdir(Path path)
VfsSourceCopyright © 2015–2017 Bridje Framework. All rights reserved.