@Beta
public interface FileSystemSupport
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(Path path) |
String |
getCharset(Path path)
Returns the name of a charset to be used when decoding the contents of this
file into characters.
|
Iterable<? extends Path> |
getChildren(Path path) |
CharSequence |
getContents(Path path)
Returns the contents of this file as a char sequence.
|
InputStream |
getContentsAsStream(Path path)
Returns an open input stream on the contents of this file.
|
long |
getLastModification(Path path) |
boolean |
isFile(Path path) |
boolean |
isFolder(Path path) |
URI |
toURI(Path path)
Returns the URI representing the given path.
|
Iterable<? extends Path> getChildren(Path path)
path - IllegalArgumentException - if it is not possible to get children of a given path for some reasonboolean exists(Path path)
path - the pathboolean isFolder(Path path)
path - boolean isFile(Path path)
path - long getLastModification(Path path)
path - long value representing the time the file was
last modified, measured in milliseconds since the epoch
(00:00:00 GMT, January 1, 1970), or 0L if the
file does not exist.String getCharset(Path path)
path - the pathIllegalArgumentException - if it is not possible to get charset of a given path for some reasonCharSequence getContents(Path path)
path - the pathIllegalArgumentException - if the path points a non existent resource or a folderInputStream getContentsAsStream(Path path)
path - the pathIllegalArgumentException - if the path points a non existent resource or a folderCopyright © 2015. All Rights Reserved.