public final class FileSystem extends Object implements Closeable
FileSystem be closable like the other file systems without raising an exception| Constructor and Description |
|---|
FileSystem(URI uri)
Initializes a new file system connected to the passed resource
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Stream<Path> |
readDirectory(URI uri)
Reads and returns the 1st-level content of the passed directory described as a URI.
|
public FileSystem(URI uri)
uri - the URI to locate the file systempublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic Stream<Path> readDirectory(URI uri) throws IOException
uri - an URI to a directoryIOException - if an I/O error occursNotDirectoryException - if the file could not otherwise be opened because it is not a directory (optional specific exception)SecurityException - In the case the default provider is used, and a security manager is installed, the checkRead
method is invoked to check read access to the directory.Copyright © 2018–2019. All rights reserved.