@Beta
public interface FileSystemSupport
Modifier and Type | Method and Description |
---|---|
boolean |
exists(Path path) |
java.lang.String |
getCharset(Path path)
Returns the name of a charset to be used when decoding the contents of this
file into characters.
|
java.lang.Iterable<? extends Path> |
getChildren(Path path) |
java.lang.CharSequence |
getContents(Path path)
Returns the contents of this file as a char sequence.
|
java.io.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) |
java.net.URI |
toURI(Path path)
Returns the URI representing the given path.
|
java.lang.Iterable<? extends Path> getChildren(Path path)
path
- java.lang.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.java.lang.String getCharset(Path path)
path
- the pathjava.lang.IllegalArgumentException
- if it is not possible to get charset of a given path for some reasonjava.lang.CharSequence getContents(Path path)
path
- the pathjava.lang.IllegalArgumentException
- if the path points a non existent resource or a folderjava.io.InputStream getContentsAsStream(Path path)
path
- the pathjava.lang.IllegalArgumentException
- if the path points a non existent resource or a folderjava.net.URI toURI(Path path)
Warning: Don't use this method to get write access.
path
- the path