public interface FileSystem
This interface provides top-level access to the OffHeap file system. It contains methods to create/delete directories, check for their existence etc.
It is generally true for the methods in this interface that an IOException will be thrown if the
processing can not complete due to an I/O error caused due to events beyond programmers control.
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Deletes the off heap file system with its directories and files and frees up the memory.
|
void |
deleteDirectory(String name)
Deletes a particular directory.
|
boolean |
directoryExists(String name)
Checks if a directory exists in the file system
|
Directory |
getOrCreateDirectory(String name)
Creates a new, empty directory or returns a reference to the named directory if it already exists.
|
Set<String> |
listDirectories()
Returns a listing of all directory names present in the system.
|
Directory getOrCreateDirectory(String name) throws IOException
name - name of the directory to be created.IOException - if an I/O error occurs.Set<String> listDirectories() throws IOException
IOException - if an I/O error occurs.void deleteDirectory(String name) throws IOException, FileNotFoundException
name - of the directory to be deletedIOException - if an I/O error occurs.FileNotFoundException - if the directory does not exist.void delete()
throws IOException
IOException - if an I/O error occurs.boolean directoryExists(String name) throws IOException
name - of the directory to check for existenceIOException - if an I/O error occurs.Copyright © 2015–2024. All rights reserved.