public class DefaultFileSystem extends java.lang.Object implements FileSystem
Constructor and Description |
---|
DefaultFileSystem(VertxInternal vertx) |
Modifier and Type | Method and Description |
---|---|
void |
chmod(java.lang.String path,
java.lang.String perms,
AsyncResultHandler<java.lang.Void> handler)
Change the permissions on the file represented by
path to perms , asynchronously. |
void |
chmod(java.lang.String path,
java.lang.String perms,
java.lang.String dirPerms,
AsyncResultHandler<java.lang.Void> handler)
Change the permissions on the file represented by
path to perms , asynchronously. |
void |
chmodSync(java.lang.String path,
java.lang.String perms)
Synchronous version of
FileSystem.chmod(String, String, AsyncResultHandler) |
void |
chmodSync(java.lang.String path,
java.lang.String perms,
java.lang.String dirPerms)
Synchronous version of
FileSystem.chmod(String, String, String, AsyncResultHandler) |
void |
copy(java.lang.String from,
java.lang.String to,
AsyncResultHandler<java.lang.Void> handler)
Copy a file from the path
from to path to , asynchronously. |
void |
copy(java.lang.String from,
java.lang.String to,
boolean recursive,
AsyncResultHandler<java.lang.Void> handler)
Copy a file from the path
from to path to , asynchronously. |
void |
copySync(java.lang.String from,
java.lang.String to)
Synchronous version of
FileSystem.copy(String, String, AsyncResultHandler) |
void |
copySync(java.lang.String from,
java.lang.String to,
boolean recursive)
Synchronous version of
FileSystem.copy(String, String, boolean, AsyncResultHandler) |
void |
createFile(java.lang.String path,
AsyncResultHandler<java.lang.Void> handler)
Creates an empty file with the specified
path , asynchronously. |
void |
createFile(java.lang.String path,
java.lang.String perms,
AsyncResultHandler<java.lang.Void> handler)
Creates an empty file with the specified
path and permissions perms , asynchronously. |
void |
createFileSync(java.lang.String path)
Synchronous version of
FileSystem.createFile(String, AsyncResultHandler) |
void |
createFileSync(java.lang.String path,
java.lang.String perms)
Synchronous version of
FileSystem.createFile(String, String, AsyncResultHandler) |
void |
delete(java.lang.String path,
AsyncResultHandler<java.lang.Void> handler)
Deletes the file represented by the specified
path , asynchronously. |
void |
delete(java.lang.String path,
boolean recursive,
AsyncResultHandler<java.lang.Void> handler)
Deletes the file represented by the specified
path , asynchronously. |
void |
deleteSync(java.lang.String path)
Synchronous version of
FileSystem.delete(String, AsyncResultHandler) |
void |
deleteSync(java.lang.String path,
boolean recursive)
Synchronous version of
FileSystem.delete(String, boolean, AsyncResultHandler) |
void |
exists(java.lang.String path,
AsyncResultHandler<java.lang.Boolean> handler)
Determines whether the file as specified by the path
path exists, asynchronously. |
boolean |
existsSync(java.lang.String path)
Synchronous version of
FileSystem.exists(String, AsyncResultHandler) |
void |
fsProps(java.lang.String path,
AsyncResultHandler<FileSystemProps> handler)
Returns properties of the file-system being used by the specified
path , asynchronously. |
FileSystemProps |
fsPropsSync(java.lang.String path)
Synchronous version of
FileSystem.fsProps(String, AsyncResultHandler) |
void |
link(java.lang.String link,
java.lang.String existing,
AsyncResultHandler<java.lang.Void> handler)
Create a hard link on the file system from
link to existing , asynchronously. |
void |
linkSync(java.lang.String link,
java.lang.String existing)
Synchronous version of
FileSystem.link(String, String, AsyncResultHandler) |
void |
lprops(java.lang.String path,
AsyncResultHandler<FileProps> handler)
Obtain properties for the link represented by
path , asynchronously. |
FileProps |
lpropsSync(java.lang.String path)
Synchronous version of
FileSystem.lprops(String, AsyncResultHandler) |
void |
mkdir(java.lang.String path,
AsyncResultHandler<java.lang.Void> handler)
Create the directory represented by
path , asynchronously. |
void |
mkdir(java.lang.String path,
boolean createParents,
AsyncResultHandler<java.lang.Void> handler)
Create the directory represented by
path , asynchronously. |
void |
mkdir(java.lang.String path,
java.lang.String perms,
AsyncResultHandler<java.lang.Void> handler)
Create the directory represented by
path , asynchronously. |
void |
mkdir(java.lang.String path,
java.lang.String perms,
boolean createParents,
AsyncResultHandler<java.lang.Void> handler)
Create the directory represented by
path , asynchronously. |
void |
mkdirSync(java.lang.String path)
Synchronous version of
FileSystem.mkdir(String, AsyncResultHandler) |
void |
mkdirSync(java.lang.String path,
boolean createParents)
Synchronous version of
FileSystem.mkdir(String, boolean, AsyncResultHandler) |
void |
mkdirSync(java.lang.String path,
java.lang.String perms)
Synchronous version of
FileSystem.mkdir(String, String, AsyncResultHandler) |
void |
mkdirSync(java.lang.String path,
java.lang.String perms,
boolean createParents)
Synchronous version of
FileSystem.mkdir(String, String, boolean, AsyncResultHandler) |
void |
move(java.lang.String from,
java.lang.String to,
AsyncResultHandler<java.lang.Void> handler)
Move a file from the path
from to path to , asynchronously. |
void |
moveSync(java.lang.String from,
java.lang.String to)
Synchronous version of
FileSystem.move(String, String, AsyncResultHandler) |
void |
open(java.lang.String path,
AsyncResultHandler<AsyncFile> handler)
Open the file represented by
path , asynchronously. |
void |
open(java.lang.String path,
java.lang.String perms,
AsyncResultHandler<AsyncFile> handler)
Open the file represented by
path , asynchronously. |
void |
open(java.lang.String path,
java.lang.String perms,
boolean createNew,
AsyncResultHandler<AsyncFile> handler)
Open the file represented by
path , asynchronously. |
void |
open(java.lang.String path,
java.lang.String perms,
boolean read,
boolean write,
boolean createNew,
AsyncResultHandler<AsyncFile> handler)
Open the file represented by
path , asynchronously. |
void |
open(java.lang.String path,
java.lang.String perms,
boolean read,
boolean write,
boolean createNew,
boolean flush,
AsyncResultHandler<AsyncFile> handler)
Open the file represented by
path , asynchronously. |
AsyncFile |
openSync(java.lang.String path)
Synchronous version of
FileSystem.open(String, AsyncResultHandler) |
AsyncFile |
openSync(java.lang.String path,
java.lang.String perms)
Synchronous version of
FileSystem.open(String, String, AsyncResultHandler) |
AsyncFile |
openSync(java.lang.String path,
java.lang.String perms,
boolean createNew)
Synchronous version of
FileSystem.open(String, String, boolean, AsyncResultHandler) |
AsyncFile |
openSync(java.lang.String path,
java.lang.String perms,
boolean read,
boolean write,
boolean createNew)
Synchronous version of
FileSystem.open(String, String, boolean, boolean, boolean, AsyncResultHandler) |
AsyncFile |
openSync(java.lang.String path,
java.lang.String perms,
boolean read,
boolean write,
boolean createNew,
boolean flush)
Synchronous version of
FileSystem.open(String, String, boolean, boolean, boolean, boolean, AsyncResultHandler) |
void |
props(java.lang.String path,
AsyncResultHandler<FileProps> handler)
Obtain properties for the file represented by
path , asynchronously. |
FileProps |
propsSync(java.lang.String path)
Synchronous version of
FileSystem.props(String, AsyncResultHandler) |
void |
readDir(java.lang.String path,
AsyncResultHandler<java.lang.String[]> handler)
Read the contents of the directory specified by
path , asynchronously. |
void |
readDir(java.lang.String path,
java.lang.String filter,
AsyncResultHandler<java.lang.String[]> handler)
Read the contents of the directory specified by
path , asynchronously. |
java.lang.String[] |
readDirSync(java.lang.String path)
Synchronous version of
FileSystem.readDir(String, AsyncResultHandler) |
java.lang.String[] |
readDirSync(java.lang.String path,
java.lang.String filter)
Synchronous version of
FileSystem.readDir(String, String, AsyncResultHandler) |
void |
readFile(java.lang.String path,
AsyncResultHandler<Buffer> handler)
Reads the entire file as represented by the path
path as a Buffer , asynchronously. |
Buffer |
readFileSync(java.lang.String path)
Synchronous version of
FileSystem.readFile(String, AsyncResultHandler) |
void |
readSymlink(java.lang.String link,
AsyncResultHandler<java.lang.String> handler)
Returns the path representing the file that the symbolic link specified by
link points to, asynchronously. |
java.lang.String |
readSymlinkSync(java.lang.String link)
Synchronous version of
FileSystem.readSymlink(String, AsyncResultHandler) |
void |
symlink(java.lang.String link,
java.lang.String existing,
AsyncResultHandler<java.lang.Void> handler)
Create a symbolic link on the file system from
link to existing , asynchronously. |
void |
symlinkSync(java.lang.String link,
java.lang.String existing)
Synchronous version of
FileSystem.link(String, String, AsyncResultHandler) |
void |
truncate(java.lang.String path,
long len,
AsyncResultHandler<java.lang.Void> handler)
Truncate the file represented by
path to length len in bytes, asynchronously. |
void |
truncateSync(java.lang.String path,
long len)
Synchronous version of
FileSystem.truncate(String, long, AsyncResultHandler) |
void |
unlink(java.lang.String link,
AsyncResultHandler<java.lang.Void> handler)
Unlinks the link on the file system represented by the path
link , asynchronously. |
void |
unlinkSync(java.lang.String link)
Synchronous version of
FileSystem.unlink(String, AsyncResultHandler) |
void |
writeFile(java.lang.String path,
Buffer data,
AsyncResultHandler<java.lang.Void> handler)
Creates the file, and writes the specified
Buffer data to the file represented by the path path ,
asynchronously. |
void |
writeFileSync(java.lang.String path,
Buffer data)
Synchronous version of
FileSystem.writeFile(String, Buffer, AsyncResultHandler) |
public DefaultFileSystem(VertxInternal vertx)
public void copy(java.lang.String from, java.lang.String to, AsyncResultHandler<java.lang.Void> handler)
FileSystem
from
to path to
, asynchronously.The copy will fail if the destination already exists.
copy
in interface FileSystem
public void copySync(java.lang.String from, java.lang.String to) throws java.lang.Exception
FileSystem
FileSystem.copy(String, String, AsyncResultHandler)
copySync
in interface FileSystem
java.lang.Exception
public void copy(java.lang.String from, java.lang.String to, boolean recursive, AsyncResultHandler<java.lang.Void> handler)
FileSystem
from
to path to
, asynchronously.
If recursive
is true
and from
represents a directory, then the directory and its contents
will be copied recursively to the destination to
.
The copy will fail if the destination if the destination already exists.
copy
in interface FileSystem
public void copySync(java.lang.String from, java.lang.String to, boolean recursive) throws java.lang.Exception
FileSystem
FileSystem.copy(String, String, boolean, AsyncResultHandler)
copySync
in interface FileSystem
java.lang.Exception
public void move(java.lang.String from, java.lang.String to, AsyncResultHandler<java.lang.Void> handler)
FileSystem
from
to path to
, asynchronously.The move will fail if the destination already exists.
move
in interface FileSystem
public void moveSync(java.lang.String from, java.lang.String to) throws java.lang.Exception
FileSystem
FileSystem.move(String, String, AsyncResultHandler)
moveSync
in interface FileSystem
java.lang.Exception
public void truncate(java.lang.String path, long len, AsyncResultHandler<java.lang.Void> handler)
FileSystem
path
to length len
in bytes, asynchronously.
The operation will fail if the file does not exist or len
is less than zero
.
truncate
in interface FileSystem
public void truncateSync(java.lang.String path, long len) throws java.lang.Exception
FileSystem
FileSystem.truncate(String, long, AsyncResultHandler)
truncateSync
in interface FileSystem
java.lang.Exception
public void chmod(java.lang.String path, java.lang.String perms, AsyncResultHandler<java.lang.Void> handler)
FileSystem
path
to perms
, asynchronously.
The permission String takes the form rwxr-x--- as
specified here.chmod
in interface FileSystem
public void chmodSync(java.lang.String path, java.lang.String perms) throws java.lang.Exception
FileSystem
FileSystem.chmod(String, String, AsyncResultHandler)
chmodSync
in interface FileSystem
java.lang.Exception
public void chmod(java.lang.String path, java.lang.String perms, java.lang.String dirPerms, AsyncResultHandler<java.lang.Void> handler)
FileSystem
path
to perms
, asynchronously.
The permission String takes the form rwxr-x--- as
specified in {here}.
If the file is directory then all contents will also have their permissions changed recursively. Any directory permissions will
be set to dirPerms
, whilst any normal file permissions will be set to perms
.
chmod
in interface FileSystem
public void chmodSync(java.lang.String path, java.lang.String perms, java.lang.String dirPerms) throws java.lang.Exception
FileSystem
FileSystem.chmod(String, String, String, AsyncResultHandler)
chmodSync
in interface FileSystem
java.lang.Exception
public void props(java.lang.String path, AsyncResultHandler<FileProps> handler)
FileSystem
path
, asynchronously.
If the file is a link, the link will be followed.props
in interface FileSystem
public FileProps propsSync(java.lang.String path) throws java.lang.Exception
FileSystem
FileSystem.props(String, AsyncResultHandler)
propsSync
in interface FileSystem
java.lang.Exception
public void lprops(java.lang.String path, AsyncResultHandler<FileProps> handler)
FileSystem
path
, asynchronously.
The link will not be followed.lprops
in interface FileSystem
public FileProps lpropsSync(java.lang.String path) throws java.lang.Exception
FileSystem
FileSystem.lprops(String, AsyncResultHandler)
lpropsSync
in interface FileSystem
java.lang.Exception
public void link(java.lang.String link, java.lang.String existing, AsyncResultHandler<java.lang.Void> handler)
FileSystem
link
to existing
, asynchronously.link
in interface FileSystem
public void linkSync(java.lang.String link, java.lang.String existing) throws java.lang.Exception
FileSystem
FileSystem.link(String, String, AsyncResultHandler)
linkSync
in interface FileSystem
java.lang.Exception
public void symlink(java.lang.String link, java.lang.String existing, AsyncResultHandler<java.lang.Void> handler)
FileSystem
link
to existing
, asynchronously.symlink
in interface FileSystem
public void symlinkSync(java.lang.String link, java.lang.String existing) throws java.lang.Exception
FileSystem
FileSystem.link(String, String, AsyncResultHandler)
symlinkSync
in interface FileSystem
java.lang.Exception
public void unlink(java.lang.String link, AsyncResultHandler<java.lang.Void> handler)
FileSystem
link
, asynchronously.unlink
in interface FileSystem
public void unlinkSync(java.lang.String link) throws java.lang.Exception
FileSystem
FileSystem.unlink(String, AsyncResultHandler)
unlinkSync
in interface FileSystem
java.lang.Exception
public void readSymlink(java.lang.String link, AsyncResultHandler<java.lang.String> handler)
FileSystem
link
points to, asynchronously.readSymlink
in interface FileSystem
public java.lang.String readSymlinkSync(java.lang.String link) throws java.lang.Exception
FileSystem
FileSystem.readSymlink(String, AsyncResultHandler)
readSymlinkSync
in interface FileSystem
java.lang.Exception
public void delete(java.lang.String path, AsyncResultHandler<java.lang.Void> handler)
FileSystem
path
, asynchronously.delete
in interface FileSystem
public void deleteSync(java.lang.String path) throws java.lang.Exception
FileSystem
FileSystem.delete(String, AsyncResultHandler)
deleteSync
in interface FileSystem
java.lang.Exception
public void delete(java.lang.String path, boolean recursive, AsyncResultHandler<java.lang.Void> handler)
FileSystem
path
, asynchronously.
If the path represents a directory and recursive = true
then the directory and its contents will be
deleted recursively.
delete
in interface FileSystem
public void deleteSync(java.lang.String path, boolean recursive) throws java.lang.Exception
FileSystem
FileSystem.delete(String, boolean, AsyncResultHandler)
deleteSync
in interface FileSystem
java.lang.Exception
public void mkdir(java.lang.String path, AsyncResultHandler<java.lang.Void> handler)
FileSystem
path
, asynchronously.The operation will fail if the directory already exists.
mkdir
in interface FileSystem
public void mkdirSync(java.lang.String path) throws java.lang.Exception
FileSystem
FileSystem.mkdir(String, AsyncResultHandler)
mkdirSync
in interface FileSystem
java.lang.Exception
public void mkdir(java.lang.String path, boolean createParents, AsyncResultHandler<java.lang.Void> handler)
FileSystem
path
, asynchronously.
If createParents
is set to true
then any non-existent parent directories of the directory
will also be created.
The operation will fail if the directory already exists.
mkdir
in interface FileSystem
public void mkdirSync(java.lang.String path, boolean createParents) throws java.lang.Exception
FileSystem
FileSystem.mkdir(String, boolean, AsyncResultHandler)
mkdirSync
in interface FileSystem
java.lang.Exception
public void mkdir(java.lang.String path, java.lang.String perms, AsyncResultHandler<java.lang.Void> handler)
FileSystem
path
, asynchronously.
The new directory will be created with permissions as specified by perms
.
The permission String takes the form rwxr-x--- as specified
in here.
The operation will fail if the directory already exists.
mkdir
in interface FileSystem
public void mkdirSync(java.lang.String path, java.lang.String perms) throws java.lang.Exception
FileSystem
FileSystem.mkdir(String, String, AsyncResultHandler)
mkdirSync
in interface FileSystem
java.lang.Exception
public void mkdir(java.lang.String path, java.lang.String perms, boolean createParents, AsyncResultHandler<java.lang.Void> handler)
FileSystem
path
, asynchronously.
The new directory will be created with permissions as specified by perms
.
The permission String takes the form rwxr-x--- as specified
in here.
If createParents
is set to true
then any non-existent parent directories of the directory
will also be created.
The operation will fail if the directory already exists.
mkdir
in interface FileSystem
public void mkdirSync(java.lang.String path, java.lang.String perms, boolean createParents) throws java.lang.Exception
FileSystem
FileSystem.mkdir(String, String, boolean, AsyncResultHandler)
mkdirSync
in interface FileSystem
java.lang.Exception
public void readDir(java.lang.String path, AsyncResultHandler<java.lang.String[]> handler)
FileSystem
path
, asynchronously.The result is an array of String representing the paths of the files inside the directory.
readDir
in interface FileSystem
public java.lang.String[] readDirSync(java.lang.String path) throws java.lang.Exception
FileSystem
FileSystem.readDir(String, AsyncResultHandler)
readDirSync
in interface FileSystem
java.lang.Exception
public void readDir(java.lang.String path, java.lang.String filter, AsyncResultHandler<java.lang.String[]> handler)
FileSystem
path
, asynchronously.
The paramater filter
is a regular expression. If filter
is specified then only the paths that
match @{filter}will be returned.
The result is an array of String representing the paths of the files inside the directory.
readDir
in interface FileSystem
public java.lang.String[] readDirSync(java.lang.String path, java.lang.String filter) throws java.lang.Exception
FileSystem
FileSystem.readDir(String, String, AsyncResultHandler)
readDirSync
in interface FileSystem
java.lang.Exception
public void readFile(java.lang.String path, AsyncResultHandler<Buffer> handler)
FileSystem
path
as a Buffer
, asynchronously.Do not user this method to read very large files or you risk running out of available RAM.
readFile
in interface FileSystem
public Buffer readFileSync(java.lang.String path) throws java.lang.Exception
FileSystem
FileSystem.readFile(String, AsyncResultHandler)
readFileSync
in interface FileSystem
java.lang.Exception
public void writeFile(java.lang.String path, Buffer data, AsyncResultHandler<java.lang.Void> handler)
FileSystem
Buffer data
to the file represented by the path path
,
asynchronously.writeFile
in interface FileSystem
public void writeFileSync(java.lang.String path, Buffer data) throws java.lang.Exception
FileSystem
FileSystem.writeFile(String, Buffer, AsyncResultHandler)
writeFileSync
in interface FileSystem
java.lang.Exception
public void open(java.lang.String path, AsyncResultHandler<AsyncFile> handler)
FileSystem
path
, asynchronously.The file is opened for both reading and writing. If the file does not already exist it will be created. Write operations will not automatically flush to storage.
open
in interface FileSystem
public AsyncFile openSync(java.lang.String path) throws java.lang.Exception
FileSystem
FileSystem.open(String, AsyncResultHandler)
openSync
in interface FileSystem
java.lang.Exception
public void open(java.lang.String path, java.lang.String perms, AsyncResultHandler<AsyncFile> handler)
FileSystem
path
, asynchronously.
The file is opened for both reading and writing. If the file does not already exist it will be created with the
permissions as specified by perms
.
Write operations will not automatically flush to storage.
open
in interface FileSystem
public AsyncFile openSync(java.lang.String path, java.lang.String perms) throws java.lang.Exception
FileSystem
FileSystem.open(String, String, AsyncResultHandler)
openSync
in interface FileSystem
java.lang.Exception
public void open(java.lang.String path, java.lang.String perms, boolean createNew, AsyncResultHandler<AsyncFile> handler)
FileSystem
path
, asynchronously.
The file is opened for both reading and writing. If the file does not already exist and
createNew
is true
it will be created with the permissions as specified by perms
, otherwise
the operation will fail.
Write operations will not automatically flush to storage.
open
in interface FileSystem
public AsyncFile openSync(java.lang.String path, java.lang.String perms, boolean createNew) throws java.lang.Exception
FileSystem
FileSystem.open(String, String, boolean, AsyncResultHandler)
openSync
in interface FileSystem
java.lang.Exception
public void open(java.lang.String path, java.lang.String perms, boolean read, boolean write, boolean createNew, AsyncResultHandler<AsyncFile> handler)
FileSystem
path
, asynchronously.
If read
is true
the file will be opened for reading. If write
is true
the file
will be opened for writing.
If the file does not already exist and
createNew
is true
it will be created with the permissions as specified by perms
, otherwise
the operation will fail.
Write operations will not automatically flush to storage.
open
in interface FileSystem
public AsyncFile openSync(java.lang.String path, java.lang.String perms, boolean read, boolean write, boolean createNew) throws java.lang.Exception
FileSystem
FileSystem.open(String, String, boolean, boolean, boolean, AsyncResultHandler)
openSync
in interface FileSystem
java.lang.Exception
public void open(java.lang.String path, java.lang.String perms, boolean read, boolean write, boolean createNew, boolean flush, AsyncResultHandler<AsyncFile> handler)
FileSystem
path
, asynchronously.
If read
is true
the file will be opened for reading. If write
is true
the file
will be opened for writing.
If the file does not already exist and
createNew
is true
it will be created with the permissions as specified by perms
, otherwise
the operation will fail.
If flush
is true
then all writes will be automatically flushed through OS buffers to the underlying
storage on each write.
open
in interface FileSystem
public AsyncFile openSync(java.lang.String path, java.lang.String perms, boolean read, boolean write, boolean createNew, boolean flush) throws java.lang.Exception
FileSystem
FileSystem.open(String, String, boolean, boolean, boolean, boolean, AsyncResultHandler)
openSync
in interface FileSystem
java.lang.Exception
public void createFile(java.lang.String path, AsyncResultHandler<java.lang.Void> handler)
FileSystem
path
, asynchronously.createFile
in interface FileSystem
public void createFileSync(java.lang.String path) throws java.lang.Exception
FileSystem
FileSystem.createFile(String, AsyncResultHandler)
createFileSync
in interface FileSystem
java.lang.Exception
public void createFile(java.lang.String path, java.lang.String perms, AsyncResultHandler<java.lang.Void> handler)
FileSystem
path
and permissions perms
, asynchronously.createFile
in interface FileSystem
public void createFileSync(java.lang.String path, java.lang.String perms) throws java.lang.Exception
FileSystem
FileSystem.createFile(String, String, AsyncResultHandler)
createFileSync
in interface FileSystem
java.lang.Exception
public void exists(java.lang.String path, AsyncResultHandler<java.lang.Boolean> handler)
FileSystem
path
exists, asynchronously.exists
in interface FileSystem
public boolean existsSync(java.lang.String path) throws java.lang.Exception
FileSystem
FileSystem.exists(String, AsyncResultHandler)
existsSync
in interface FileSystem
java.lang.Exception
public void fsProps(java.lang.String path, AsyncResultHandler<FileSystemProps> handler)
FileSystem
path
, asynchronously.fsProps
in interface FileSystem
public FileSystemProps fsPropsSync(java.lang.String path) throws java.lang.Exception
FileSystem
FileSystem.fsProps(String, AsyncResultHandler)
fsPropsSync
in interface FileSystem
java.lang.Exception