public class FileSystemImpl extends Object implements FileSystem
| Modifier and Type | Class and Description |
|---|---|
protected class |
FileSystemImpl.BlockingAction<T> |
| Modifier and Type | Field and Description |
|---|---|
protected VertxInternal |
vertx |
| Constructor and Description |
|---|
FileSystemImpl(VertxInternal vertx) |
| Modifier and Type | Method and Description |
|---|---|
FileSystem |
chmod(String path,
String perms,
Handler<AsyncResult<Void>> handler)
Change the permissions on the file represented by
path to perms, asynchronously. |
FileSystem |
chmodBlocking(String path,
String perms)
Blocking version of
FileSystem.chmod(String, String, Handler) |
protected FileSystemImpl.BlockingAction<Void> |
chmodInternal(String path,
String perms,
String dirPerms,
Handler<AsyncResult<Void>> handler) |
FileSystem |
chmodRecursive(String path,
String perms,
String dirPerms,
Handler<AsyncResult<Void>> handler)
Change the permissions on the file represented by
path to perms, asynchronously. |
FileSystem |
chmodRecursiveBlocking(String path,
String perms,
String dirPerms)
Blocking version of
FileSystem.chmodRecursive(String, String, String, Handler) |
FileSystem |
chown(String path,
String user,
String group,
Handler<AsyncResult<Void>> handler)
Change the ownership on the file represented by
path to user and {code group}, asynchronously. |
FileSystem |
chownBlocking(String path,
String user,
String group)
Blocking version of
FileSystem.chown(String, String, String, Handler) |
protected FileSystemImpl.BlockingAction<Void> |
chownInternal(String path,
String user,
String group,
Handler<AsyncResult<Void>> handler) |
FileSystem |
copy(String from,
String to,
CopyOptions options,
Handler<AsyncResult<Void>> handler)
Copy a file from the path
from to path to, asynchronously. |
FileSystem |
copy(String from,
String to,
Handler<AsyncResult<Void>> handler)
Copy a file from the path
from to path to, asynchronously. |
FileSystem |
copyBlocking(String from,
String to)
Blocking version of
FileSystem.copy(String, String, Handler) |
FileSystem |
copyRecursive(String from,
String to,
boolean recursive,
Handler<AsyncResult<Void>> handler)
Copy a file from the path
from to path to, asynchronously. |
FileSystem |
copyRecursiveBlocking(String from,
String to,
boolean recursive)
Blocking version of
FileSystem.copyRecursive(String, String, boolean, Handler) |
FileSystem |
createFile(String path,
Handler<AsyncResult<Void>> handler)
Creates an empty file with the specified
path, asynchronously. |
FileSystem |
createFile(String path,
String perms,
Handler<AsyncResult<Void>> handler)
Creates an empty file with the specified
path and permissions perms, asynchronously. |
FileSystem |
createFileBlocking(String path)
Blocking version of
FileSystem.createFile(String, Handler) |
FileSystem |
createFileBlocking(String path,
String perms)
Blocking version of
FileSystem.createFile(String, String, Handler) |
protected FileSystemImpl.BlockingAction<Void> |
createFileInternal(String p,
String perms,
Handler<AsyncResult<Void>> handler) |
FileSystem |
createTempDirectory(String prefix,
Handler<AsyncResult<String>> handler)
Creates a new directory in the default temporary-file directory, using the given
prefix to generate its name, asynchronously.
|
FileSystem |
createTempDirectory(String prefix,
String perms,
Handler<AsyncResult<String>> handler)
Creates a new directory in the default temporary-file directory, using the given
prefix to generate its name, asynchronously.
|
FileSystem |
createTempDirectory(String dir,
String prefix,
String perms,
Handler<AsyncResult<String>> handler)
Creates a new directory in the directory provided by the path
path, using the given
prefix to generate its name, asynchronously. |
String |
createTempDirectoryBlocking(String prefix)
Blocking version of
FileSystem.createTempDirectory(String, Handler) |
String |
createTempDirectoryBlocking(String prefix,
String perms)
Blocking version of
FileSystem.createTempDirectory(String, String, Handler) |
String |
createTempDirectoryBlocking(String dir,
String prefix,
String perms)
Blocking version of
FileSystem.createTempDirectory(String, String, String, Handler) |
protected FileSystemImpl.BlockingAction<String> |
createTempDirectoryInternal(String parentDir,
String prefix,
String perms,
Handler<AsyncResult<String>> handler) |
FileSystem |
createTempFile(String prefix,
String suffix,
Handler<AsyncResult<String>> handler)
Creates a new file in the default temporary-file directory, using the given
prefix and suffix to generate its name, asynchronously.
|
FileSystem |
createTempFile(String prefix,
String suffix,
String perms,
Handler<AsyncResult<String>> handler)
Creates a new file in the directory provided by the path
dir, using the given
prefix and suffix to generate its name, asynchronously. |
FileSystem |
createTempFile(String dir,
String prefix,
String suffix,
String perms,
Handler<AsyncResult<String>> handler)
Creates a new file in the directory provided by the path
dir, using the given
prefix and suffix to generate its name, asynchronously. |
String |
createTempFileBlocking(String prefix,
String suffix)
Blocking version of
FileSystem.createTempFile(String, String, Handler) |
String |
createTempFileBlocking(String prefix,
String suffix,
String perms)
Blocking version of
FileSystem.createTempFile(String, String, String, Handler) |
String |
createTempFileBlocking(String dir,
String prefix,
String suffix,
String perms)
Blocking version of
FileSystem.createTempFile(String, String, String, String, Handler) |
protected FileSystemImpl.BlockingAction<String> |
createTempFileInternal(String parentDir,
String prefix,
String suffix,
String perms,
Handler<AsyncResult<String>> handler) |
static void |
delete(Path path,
boolean recursive) |
FileSystem |
delete(String path,
Handler<AsyncResult<Void>> handler)
Deletes the file represented by the specified
path, asynchronously. |
FileSystem |
deleteBlocking(String path)
Blocking version of
FileSystem.delete(String, Handler) |
FileSystem |
deleteRecursive(String path,
boolean recursive,
Handler<AsyncResult<Void>> handler)
Deletes the file represented by the specified
path, asynchronously. |
FileSystem |
deleteRecursiveBlocking(String path,
boolean recursive)
Blocking version of
FileSystem.deleteRecursive(String, boolean, Handler) |
protected AsyncFile |
doOpen(String path,
OpenOptions options,
ContextInternal context) |
FileSystem |
exists(String path,
Handler<AsyncResult<Boolean>> handler)
Determines whether the file as specified by the path
path exists, asynchronously. |
boolean |
existsBlocking(String path)
Blocking version of
FileSystem.exists(String, Handler) |
FileSystem |
fsProps(String path,
Handler<AsyncResult<FileSystemProps>> handler)
Returns properties of the file-system being used by the specified
path, asynchronously. |
FileSystemProps |
fsPropsBlocking(String path)
Blocking version of
FileSystem.fsProps(String, Handler) |
FileSystem |
link(String link,
String existing,
Handler<AsyncResult<Void>> handler)
Create a hard link on the file system from
link to existing, asynchronously. |
FileSystem |
linkBlocking(String link,
String existing)
Blocking version of
FileSystem.link(String, String, Handler) |
FileSystem |
lprops(String path,
Handler<AsyncResult<FileProps>> handler)
Obtain properties for the link represented by
path, asynchronously. |
FileProps |
lpropsBlocking(String path)
Blocking version of
FileSystem.lprops(String, Handler) |
FileSystem |
mkdir(String path,
Handler<AsyncResult<Void>> handler)
Create the directory represented by
path, asynchronously. |
FileSystem |
mkdir(String path,
String perms,
Handler<AsyncResult<Void>> handler)
Create the directory represented by
path, asynchronously. |
FileSystem |
mkdirBlocking(String path)
Blocking version of
FileSystem.mkdir(String, Handler) |
FileSystem |
mkdirBlocking(String path,
String perms)
Blocking version of
FileSystem.mkdir(String, String, Handler) |
protected FileSystemImpl.BlockingAction<Void> |
mkdirInternal(String path,
String perms,
boolean createParents,
Handler<AsyncResult<Void>> handler) |
FileSystem |
mkdirs(String path,
Handler<AsyncResult<Void>> handler)
Create the directory represented by
path and any non existent parents, asynchronously. |
FileSystem |
mkdirs(String path,
String perms,
Handler<AsyncResult<Void>> handler)
Create the directory represented by
path and any non existent parents, asynchronously. |
FileSystem |
mkdirsBlocking(String path)
Blocking version of
FileSystem.mkdirs(String, Handler) |
FileSystem |
mkdirsBlocking(String path,
String perms)
Blocking version of
FileSystem.mkdirs(String, String, Handler) |
FileSystem |
move(String from,
String to,
CopyOptions options,
Handler<AsyncResult<Void>> handler)
Move a file from the path
from to path to, asynchronously. |
FileSystem |
move(String from,
String to,
Handler<AsyncResult<Void>> handler)
Move a file from the path
from to path to, asynchronously. |
FileSystem |
moveBlocking(String from,
String to)
Blocking version of
FileSystem.move(String, String, Handler) |
FileSystem |
open(String path,
OpenOptions options,
Handler<AsyncResult<AsyncFile>> handler)
Open the file represented by
path, asynchronously. |
AsyncFile |
openBlocking(String path,
OpenOptions options)
Blocking version of
FileSystem.open(String, io.vertx.core.file.OpenOptions, Handler) |
FileSystem |
props(String path,
Handler<AsyncResult<FileProps>> handler)
Obtain properties for the file represented by
path, asynchronously. |
FileProps |
propsBlocking(String path)
Blocking version of
FileSystem.props(String, Handler) |
FileSystem |
readDir(String path,
Handler<AsyncResult<List<String>>> handler)
Read the contents of the directory specified by
path, asynchronously. |
FileSystem |
readDir(String path,
String filter,
Handler<AsyncResult<List<String>>> handler)
Read the contents of the directory specified by
path, asynchronously. |
List<String> |
readDirBlocking(String path)
Blocking version of
FileSystem.readDir(String, Handler) |
List<String> |
readDirBlocking(String path,
String filter)
Blocking version of
FileSystem.readDir(String, String, Handler) |
FileSystem |
readFile(String path,
Handler<AsyncResult<Buffer>> handler)
Reads the entire file as represented by the path
path as a Buffer, asynchronously. |
Buffer |
readFileBlocking(String path)
Blocking version of
FileSystem.readFile(String, Handler) |
FileSystem |
readSymlink(String link,
Handler<AsyncResult<String>> handler)
Returns the path representing the file that the symbolic link specified by
link points to, asynchronously. |
String |
readSymlinkBlocking(String link)
Blocking version of
FileSystem.readSymlink(String, Handler) |
FileSystem |
symlink(String link,
String existing,
Handler<AsyncResult<Void>> handler)
Create a symbolic link on the file system from
link to existing, asynchronously. |
FileSystem |
symlinkBlocking(String link,
String existing)
Blocking version of
FileSystem.link(String, String, Handler) |
FileSystem |
truncate(String path,
long len,
Handler<AsyncResult<Void>> handler)
Truncate the file represented by
path to length len in bytes, asynchronously. |
FileSystem |
truncateBlocking(String path,
long len)
Blocking version of
FileSystem.truncate(String, long, Handler) |
FileSystem |
unlink(String link,
Handler<AsyncResult<Void>> handler)
Unlinks the link on the file system represented by the path
link, asynchronously. |
FileSystem |
unlinkBlocking(String link)
Blocking version of
FileSystem.unlink(String, Handler) |
FileSystem |
writeFile(String path,
Buffer data,
Handler<AsyncResult<Void>> handler)
Creates the file, and writes the specified
Buffer data to the file represented by the path path,
asynchronously. |
FileSystem |
writeFileBlocking(String path,
Buffer data)
Blocking version of
FileSystem.writeFile(String, Buffer, Handler) |
protected final VertxInternal vertx
public FileSystemImpl(VertxInternal vertx)
public FileSystem copy(String from, String to, Handler<AsyncResult<Void>> handler)
FileSystemfrom to path to, asynchronously.
The copy will fail if the destination already exists.
copy in interface FileSystemfrom - the path to copy fromto - the path to copy tohandler - the handler that will be called on completionpublic FileSystem copy(String from, String to, CopyOptions options, Handler<AsyncResult<Void>> handler)
FileSystemfrom to path to, asynchronously.copy in interface FileSystemfrom - the path to copy fromto - the path to copy tooptions - options describing how the file should be copiedhandler - the handler that will be called on completionpublic FileSystem copyBlocking(String from, String to)
FileSystemFileSystem.copy(String, String, Handler)copyBlocking in interface FileSystempublic FileSystem copyRecursive(String from, String to, boolean recursive, Handler<AsyncResult<Void>> handler)
FileSystemfrom 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.
copyRecursive in interface FileSystemfrom - the path to copy fromto - the path to copy tohandler - the handler that will be called on completionpublic FileSystem copyRecursiveBlocking(String from, String to, boolean recursive)
FileSystemFileSystem.copyRecursive(String, String, boolean, Handler)copyRecursiveBlocking in interface FileSystempublic FileSystem move(String from, String to, Handler<AsyncResult<Void>> handler)
FileSystemfrom to path to, asynchronously.
The move will fail if the destination already exists.
move in interface FileSystemfrom - the path to copy fromto - the path to copy tohandler - the handler that will be called on completionpublic FileSystem move(String from, String to, CopyOptions options, Handler<AsyncResult<Void>> handler)
FileSystemfrom to path to, asynchronously.move in interface FileSystemfrom - the path to copy fromto - the path to copy tooptions - options describing how the file should be copiedhandler - the handler that will be called on completionpublic FileSystem moveBlocking(String from, String to)
FileSystemFileSystem.move(String, String, Handler)moveBlocking in interface FileSystempublic FileSystem truncate(String path, long len, Handler<AsyncResult<Void>> handler)
FileSystempath 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 FileSystempath - the path to the filelen - the length to truncate it tohandler - the handler that will be called on completionpublic FileSystem truncateBlocking(String path, long len)
FileSystemFileSystem.truncate(String, long, Handler)truncateBlocking in interface FileSystempublic FileSystem chmod(String path, String perms, Handler<AsyncResult<Void>> handler)
FileSystempath to perms, asynchronously.
The permission String takes the form rwxr-x--- as specified here.
chmod in interface FileSystempath - the path to the fileperms - the permissions stringhandler - the handler that will be called on completionpublic FileSystem chmodBlocking(String path, String perms)
FileSystemFileSystem.chmod(String, String, Handler)chmodBlocking in interface FileSystempublic FileSystem chmodRecursive(String path, String perms, String dirPerms, Handler<AsyncResult<Void>> handler)
FileSystempath 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.
chmodRecursive in interface FileSystempath - the path to the fileperms - the permissions stringdirPerms - the directory permissionshandler - the handler that will be called on completionpublic FileSystem chmodRecursiveBlocking(String path, String perms, String dirPerms)
FileSystemFileSystem.chmodRecursive(String, String, String, Handler)chmodRecursiveBlocking in interface FileSystempublic FileSystem chown(String path, String user, String group, Handler<AsyncResult<Void>> handler)
FileSystempath to user and {code group}, asynchronously.chown in interface FileSystempath - the path to the fileuser - the user name, null will not change the user namegroup - the user group, null will not change the user group namehandler - the handler that will be called on completionpublic FileSystem chownBlocking(String path, String user, String group)
FileSystemFileSystem.chown(String, String, String, Handler)chownBlocking in interface FileSystempublic FileSystem props(String path, Handler<AsyncResult<FileProps>> handler)
FileSystempath, asynchronously.
If the file is a link, the link will be followed.
props in interface FileSystempath - the path to the filehandler - the handler that will be called on completionpublic FileProps propsBlocking(String path)
FileSystemFileSystem.props(String, Handler)propsBlocking in interface FileSystempublic FileSystem lprops(String path, Handler<AsyncResult<FileProps>> handler)
FileSystempath, asynchronously.
The link will not be followed.
lprops in interface FileSystempath - the path to the filehandler - the handler that will be called on completionpublic FileProps lpropsBlocking(String path)
FileSystemFileSystem.lprops(String, Handler)lpropsBlocking in interface FileSystempublic FileSystem link(String link, String existing, Handler<AsyncResult<Void>> handler)
FileSystemlink to existing, asynchronously.link in interface FileSystemlink - the linkexisting - the link destinationhandler - the handler that will be called on completionpublic FileSystem linkBlocking(String link, String existing)
FileSystemFileSystem.link(String, String, Handler)linkBlocking in interface FileSystempublic FileSystem symlink(String link, String existing, Handler<AsyncResult<Void>> handler)
FileSystemlink to existing, asynchronously.symlink in interface FileSystemlink - the linkexisting - the link destinationhandler - the handler that will be called on completionpublic FileSystem symlinkBlocking(String link, String existing)
FileSystemFileSystem.link(String, String, Handler)symlinkBlocking in interface FileSystempublic FileSystem unlink(String link, Handler<AsyncResult<Void>> handler)
FileSystemlink, asynchronously.unlink in interface FileSystemlink - the linkhandler - the handler that will be called on completionpublic FileSystem unlinkBlocking(String link)
FileSystemFileSystem.unlink(String, Handler)unlinkBlocking in interface FileSystempublic FileSystem readSymlink(String link, Handler<AsyncResult<String>> handler)
FileSystemlink points to, asynchronously.readSymlink in interface FileSystemlink - the linkhandler - the handler that will be called on completionpublic String readSymlinkBlocking(String link)
FileSystemFileSystem.readSymlink(String, Handler)readSymlinkBlocking in interface FileSystempublic FileSystem delete(String path, Handler<AsyncResult<Void>> handler)
FileSystempath, asynchronously.delete in interface FileSystempath - path to the filehandler - the handler that will be called on completionpublic FileSystem deleteBlocking(String path)
FileSystemFileSystem.delete(String, Handler)deleteBlocking in interface FileSystempublic FileSystem deleteRecursive(String path, boolean recursive, Handler<AsyncResult<Void>> handler)
FileSystempath, asynchronously.
If the path represents a directory and recursive = true then the directory and its contents will be
deleted recursively.
deleteRecursive in interface FileSystempath - path to the filerecursive - delete recursively?handler - the handler that will be called on completionpublic FileSystem deleteRecursiveBlocking(String path, boolean recursive)
FileSystemFileSystem.deleteRecursive(String, boolean, Handler)deleteRecursiveBlocking in interface FileSystempublic FileSystem mkdir(String path, Handler<AsyncResult<Void>> handler)
FileSystempath, asynchronously.
The operation will fail if the directory already exists.
mkdir in interface FileSystempath - path to the filehandler - the handler that will be called on completionpublic FileSystem mkdirBlocking(String path)
FileSystemFileSystem.mkdir(String, Handler)mkdirBlocking in interface FileSystempublic FileSystem mkdirs(String path, Handler<AsyncResult<Void>> handler)
FileSystempath and any non existent parents, asynchronously.
The operation will fail if the path already exists but is not a directory.
mkdirs in interface FileSystempath - path to the filehandler - the handler that will be called on completionpublic FileSystem mkdirsBlocking(String path)
FileSystemFileSystem.mkdirs(String, Handler)mkdirsBlocking in interface FileSystempublic FileSystem mkdir(String path, String perms, Handler<AsyncResult<Void>> handler)
FileSystempath, 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 FileSystempath - path to the fileperms - the permissions stringhandler - the handler that will be called on completionpublic FileSystem mkdirBlocking(String path, String perms)
FileSystemFileSystem.mkdir(String, String, Handler)mkdirBlocking in interface FileSystempublic FileSystem mkdirs(String path, String perms, Handler<AsyncResult<Void>> handler)
FileSystempath and any non existent parents, 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 path already exists but is not a directory.
mkdirs in interface FileSystempath - path to the fileperms - the permissions stringhandler - the handler that will be called on completionpublic FileSystem mkdirsBlocking(String path, String perms)
FileSystemFileSystem.mkdirs(String, String, Handler)mkdirsBlocking in interface FileSystempublic FileSystem readDir(String path, Handler<AsyncResult<List<String>>> handler)
FileSystempath, asynchronously.
The result is an array of String representing the paths of the files inside the directory.
readDir in interface FileSystempath - path to the filehandler - the handler that will be called on completionpublic List<String> readDirBlocking(String path)
FileSystemFileSystem.readDir(String, Handler)readDirBlocking in interface FileSystempublic FileSystem readDir(String path, String filter, Handler<AsyncResult<List<String>>> handler)
FileSystempath, asynchronously.
The parameter 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 FileSystempath - path to the directoryfilter - the filter expressionhandler - the handler that will be called on completionpublic List<String> readDirBlocking(String path, String filter)
FileSystemFileSystem.readDir(String, String, Handler)readDirBlocking in interface FileSystempublic FileSystem readFile(String path, Handler<AsyncResult<Buffer>> handler)
FileSystempath as a Buffer, asynchronously.
Do not use this method to read very large files or you risk running out of available RAM.
readFile in interface FileSystempath - path to the filehandler - the handler that will be called on completionpublic Buffer readFileBlocking(String path)
FileSystemFileSystem.readFile(String, Handler)readFileBlocking in interface FileSystempublic FileSystem writeFile(String path, Buffer data, Handler<AsyncResult<Void>> handler)
FileSystemBuffer data to the file represented by the path path,
asynchronously.writeFile in interface FileSystempath - path to the filehandler - the handler that will be called on completionpublic FileSystem writeFileBlocking(String path, Buffer data)
FileSystemFileSystem.writeFile(String, Buffer, Handler)writeFileBlocking in interface FileSystempublic FileSystem open(String path, OpenOptions options, Handler<AsyncResult<AsyncFile>> handler)
FileSystempath, asynchronously.
The file is opened for both reading and writing. If the file does not already exist it will be created.
open in interface FileSystempath - path to the fileoptions - options describing how the file should be openedpublic AsyncFile openBlocking(String path, OpenOptions options)
FileSystemFileSystem.open(String, io.vertx.core.file.OpenOptions, Handler)openBlocking in interface FileSystempublic FileSystem createFile(String path, Handler<AsyncResult<Void>> handler)
FileSystempath, asynchronously.createFile in interface FileSystempath - path to the filehandler - the handler that will be called on completionpublic FileSystem createFileBlocking(String path)
FileSystemFileSystem.createFile(String, Handler)createFileBlocking in interface FileSystempublic FileSystem createFile(String path, String perms, Handler<AsyncResult<Void>> handler)
FileSystempath and permissions perms, asynchronously.createFile in interface FileSystempath - path to the fileperms - the permissions stringhandler - the handler that will be called on completionpublic FileSystem createFileBlocking(String path, String perms)
FileSystemFileSystem.createFile(String, String, Handler)createFileBlocking in interface FileSystempublic FileSystem exists(String path, Handler<AsyncResult<Boolean>> handler)
FileSystempath exists, asynchronously.exists in interface FileSystempath - path to the filehandler - the handler that will be called on completionpublic boolean existsBlocking(String path)
FileSystemFileSystem.exists(String, Handler)existsBlocking in interface FileSystempublic FileSystem fsProps(String path, Handler<AsyncResult<FileSystemProps>> handler)
FileSystempath, asynchronously.fsProps in interface FileSystempath - path to anywhere on the filesystemhandler - the handler that will be called on completionpublic FileSystemProps fsPropsBlocking(String path)
FileSystemFileSystem.fsProps(String, Handler)fsPropsBlocking in interface FileSystempublic FileSystem createTempDirectory(String prefix, Handler<AsyncResult<String>> handler)
FileSystem
As with the File.createTempFile methods, this method is only
part of a temporary-file facility.A shutdown-hook,
or the File.deleteOnExit() mechanism may be used to delete the directory automatically.
createTempDirectory in interface FileSystemprefix - the prefix string to be used in generating the directory's name;
may be nullhandler - the handler that will be called on completionpublic String createTempDirectoryBlocking(String prefix)
FileSystemFileSystem.createTempDirectory(String, Handler)createTempDirectoryBlocking in interface FileSystempublic FileSystem createTempDirectory(String prefix, String perms, Handler<AsyncResult<String>> handler)
FileSystem
The new directory will be created with permissions as specified by perms.
As with the File.createTempFile methods, this method is only
part of a temporary-file facility.A shutdown-hook,
or the File.deleteOnExit() mechanism may be used to delete the directory automatically.
createTempDirectory in interface FileSystemprefix - the prefix string to be used in generating the directory's name;
may be nullperms - the permissions stringhandler - the handler that will be called on completionpublic String createTempDirectoryBlocking(String prefix, String perms)
FileSystemFileSystem.createTempDirectory(String, String, Handler)createTempDirectoryBlocking in interface FileSystempublic FileSystem createTempDirectory(String dir, String prefix, String perms, Handler<AsyncResult<String>> handler)
FileSystempath, using the given
prefix to generate its name, asynchronously.
The new directory will be created with permissions as specified by perms.
As with the File.createTempFile methods, this method is only
part of a temporary-file facility.A shutdown-hook,
or the File.deleteOnExit() mechanism may be used to delete the directory automatically.
createTempDirectory in interface FileSystemdir - the path to directory in which to create the directoryprefix - the prefix string to be used in generating the directory's name;
may be nullperms - the permissions stringhandler - the handler that will be called on completionpublic String createTempDirectoryBlocking(String dir, String prefix, String perms)
FileSystemFileSystem.createTempDirectory(String, String, String, Handler)createTempDirectoryBlocking in interface FileSystempublic FileSystem createTempFile(String prefix, String suffix, Handler<AsyncResult<String>> handler)
FileSystem
As with the File.createTempFile methods, this method is only
part of a temporary-file facility.A shutdown-hook,
or the File.deleteOnExit() mechanism may be used to delete the directory automatically.
createTempFile in interface FileSystemprefix - the prefix string to be used in generating the directory's name;
may be nullsuffix - the suffix string to be used in generating the file's name;
may be null, in which case ".tmp" is usedhandler - the handler that will be called on completionpublic String createTempFileBlocking(String prefix, String suffix)
FileSystemFileSystem.createTempFile(String, String, Handler)createTempFileBlocking in interface FileSystempublic FileSystem createTempFile(String prefix, String suffix, String perms, Handler<AsyncResult<String>> handler)
FileSystemdir, using the given
prefix and suffix to generate its name, asynchronously.
As with the File.createTempFile methods, this method is only
part of a temporary-file facility.A shutdown-hook,
or the File.deleteOnExit() mechanism may be used to delete the directory automatically.
createTempFile in interface FileSystemprefix - the prefix string to be used in generating the directory's name;
may be nullsuffix - the suffix string to be used in generating the file's name;
may be null, in which case ".tmp" is usedhandler - the handler that will be called on completionpublic String createTempFileBlocking(String prefix, String suffix, String perms)
FileSystemFileSystem.createTempFile(String, String, String, Handler)createTempFileBlocking in interface FileSystempublic FileSystem createTempFile(String dir, String prefix, String suffix, String perms, Handler<AsyncResult<String>> handler)
FileSystemdir, using the given
prefix and suffix to generate its name, asynchronously.
The new directory will be created with permissions as specified by perms.
As with the File.createTempFile methods, this method is only
part of a temporary-file facility.A shutdown-hook,
or the File.deleteOnExit() mechanism may be used to delete the directory automatically.
createTempFile in interface FileSystemdir - the path to directory in which to create the directoryprefix - the prefix string to be used in generating the directory's name;
may be nullsuffix - the suffix string to be used in generating the file's name;
may be null, in which case ".tmp" is usedperms - the permissions stringhandler - the handler that will be called on completionpublic String createTempFileBlocking(String dir, String prefix, String suffix, String perms)
FileSystemFileSystem.createTempFile(String, String, String, String, Handler)createTempFileBlocking in interface FileSystemprotected FileSystemImpl.BlockingAction<Void> chmodInternal(String path, String perms, String dirPerms, Handler<AsyncResult<Void>> handler)
protected FileSystemImpl.BlockingAction<Void> chownInternal(String path, String user, String group, Handler<AsyncResult<Void>> handler)
public static void delete(Path path, boolean recursive) throws IOException
IOExceptionprotected FileSystemImpl.BlockingAction<Void> mkdirInternal(String path, String perms, boolean createParents, Handler<AsyncResult<Void>> handler)
protected FileSystemImpl.BlockingAction<String> createTempDirectoryInternal(String parentDir, String prefix, String perms, Handler<AsyncResult<String>> handler)
protected FileSystemImpl.BlockingAction<String> createTempFileInternal(String parentDir, String prefix, String suffix, String perms, Handler<AsyncResult<String>> handler)
protected AsyncFile doOpen(String path, OpenOptions options, ContextInternal context)
protected FileSystemImpl.BlockingAction<Void> createFileInternal(String p, String perms, Handler<AsyncResult<Void>> handler)
Copyright © 2020. All rights reserved.