Top Description Inners Fields Constructors Methods
io.vertx.core.file.impl

public Class FileSystemImpl

extends Object
implements FileSystem
Class Inheritance
All Implemented Interfaces
io.vertx.core.file.FileSystem
Known Direct Subclasses
io.vertx.core.file.impl.WindowsFileSystem
Imports
io.vertx.codegen.annotations.Nullable, io.vertx.core.AsyncResult, .Future, .Handler, .Promise, io.vertx.core.buffer.Buffer, io.vertx.core.file.AsyncFile, .CopyOptions, .FileProps, .FileSystem, .FileSystemException, .FileSystemProps, .OpenOptions, io.vertx.core.impl.ContextInternal, .VertxInternal, java.io.File, .FilenameFilter, .IOException, .RandomAccessFile, java.nio.file.CopyOption, .FileAlreadyExistsException, .FileStore, .FileVisitOption, .FileVisitResult, .Files, .LinkOption, .Path, .Paths, .SimpleFileVisitor, .StandardCopyOption, java.nio.file.attribute.BasicFileAttributes, .FileAttribute, .GroupPrincipal, .PosixFileAttributeView, .PosixFilePermission, .PosixFilePermissions, .UserPrincipal, .UserPrincipalLookupService, java.util.ArrayList, .EnumSet, .HashSet, .List, .Objects, .Set, java.util.regex.Pattern

This class is thread-safe
Author
Tim Fox

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected abstract class

Field Summary

Modifier and TypeField and Description
private static final CopyOptions
protected final VertxInternal

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public FileSystem
chmod(String
the path to the file
path
,
String
the permissions string
perms
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.chmod.

Change the permissions on the file represented by path to perms, asynchronously.

public Future<Void>
chmod(String path, String perms)

Implements io.vertx.core.file.FileSystem.chmod.

Like chmod(String, String, Handler) but returns a Future of the asynchronous result

public FileSystem
private FileSystemImpl.BlockingAction<Void>
protected FileSystemImpl.BlockingAction<Void>
chmodInternal(String path, String perms, String dirPerms)

public FileSystem
chmodRecursive(String
the path to the file
path
,
String
the permissions string
perms
,
String
the directory permissions
dirPerms
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.chmodRecursive.

Change the permissions on the file represented by path to perms, asynchronously.

public Future<Void>
chmodRecursive(String path, String perms, String dirPerms)

Implements io.vertx.core.file.FileSystem.chmodRecursive.

Like chmodRecursive(String, String, String, Handler) but returns a Future of the asynchronous result

public FileSystem
public FileSystem
chown(String path, String user, String group, Handler<AsyncResult<Void>> handler)

public Future<Void>
public FileSystem
chownBlocking(String path, String user, String group)

protected FileSystemImpl.BlockingAction<Void>
chownInternal(String path, String user, String group)

public FileSystem
copy(String
the path to copy from
from
,
String
the path to copy to
to
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.copy.

Copy a file from the path from to path to, asynchronously.

public Future<Void>
copy(String from, String to)

Implements io.vertx.core.file.FileSystem.copy.

Like copy(String, String, Handler) but returns a Future of the asynchronous result

public FileSystem
copy(String
the path to copy from
from
,
String
the path to copy to
to
,
CopyOptions
options describing how the file should be copied
options
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.copy.

Copy a file from the path from to path to, asynchronously.

public Future<Void>
copy(String from, String to, CopyOptions options)

Implements io.vertx.core.file.FileSystem.copy.

Like copy(String, String, CopyOptions, Handler) but returns a Future of the asynchronous result

public FileSystem
private FileSystemImpl.BlockingAction<Void>
public FileSystem
copyRecursive(String
the path to copy from
from
,
String
the path to copy to
to
,
boolean recursive, Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.copyRecursive.

Copy a file from the path from to path to, asynchronously.

public Future<Void>
copyRecursive(String from, String to, boolean recursive)

Implements io.vertx.core.file.FileSystem.copyRecursive.

Like copyRecursive(String, String, boolean, Handler) but returns a Future of the asynchronous result

public FileSystem
private FileSystemImpl.BlockingAction<Void>
copyRecursiveInternal(String from, String to, boolean recursive)

public FileSystem
createFile(String
path to the file
path
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.createFile.

Creates an empty file with the specified path, asynchronously.

public Future<Void>
createFile(String path)

Implements io.vertx.core.file.FileSystem.createFile.

Like createFile(String, Handler) but returns a Future of the asynchronous result

public FileSystem
createFile(String
path to the file
path
,
String
the permissions string
perms
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.createFile.

Creates an empty file with the specified path and permissions perms, asynchronously.

public Future<Void>
createFile(String path, String perms)

Implements io.vertx.core.file.FileSystem.createFile.

Like createFile(String, String, Handler) but returns a Future of the asynchronous result

public FileSystem
public FileSystem
private FileSystemImpl.BlockingAction<Void>
protected FileSystemImpl.BlockingAction<Void>
public FileSystem
createTempDirectory(String
the prefix string to be used in generating the directory's name; may be null
prefix
,
Handler<AsyncResult<String>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.createTempDirectory.

Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.

public Future<String>
createTempDirectory(String prefix)

Implements io.vertx.core.file.FileSystem.createTempDirectory.

Like createTempDirectory(String, Handler) but returns a Future of the asynchronous result

public FileSystem
createTempDirectory(String
the prefix string to be used in generating the directory's name; may be null
prefix
,
String
the permissions string
perms
,
Handler<AsyncResult<String>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.createTempDirectory.

Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.

public Future<String>
createTempDirectory(String prefix, String perms)

Implements io.vertx.core.file.FileSystem.createTempDirectory.

Like createTempDirectory(String, String, Handler) but returns a Future of the asynchronous result

public FileSystem
createTempDirectory(String
the path to directory in which to create the directory
dir
,
String
the prefix string to be used in generating the directory's name; may be null
prefix
,
String
the permissions string
perms
,
Handler<AsyncResult<String>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.createTempDirectory.

Creates a new directory in the directory provided by the path path, using the given prefix to generate its name, asynchronously.

public Future<String>
public String
public String
public String
protected FileSystemImpl.BlockingAction<String>
createTempDirectoryInternal(String parentDir, String prefix, String perms)

public FileSystem
createTempFile(String
the prefix string to be used in generating the directory's name; may be null
prefix
,
String
the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
suffix
,
Handler<AsyncResult<String>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.createTempFile.

Creates a new file in the default temporary-file directory, using the given prefix and suffix to generate its name, asynchronously.

public Future<String>
createTempFile(String prefix, String suffix)

Implements io.vertx.core.file.FileSystem.createTempFile.

Like createTempFile(String, String, Handler) but returns a Future of the asynchronous result

public FileSystem
createTempFile(String
the prefix string to be used in generating the directory's name; may be null
prefix
,
String
the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
suffix
,
String perms, Handler<AsyncResult<String>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.createTempFile.

Creates a new file in the directory provided by the path dir, using the given prefix and suffix to generate its name, asynchronously.

public Future<String>
createTempFile(String prefix, String suffix, String perms)

Implements io.vertx.core.file.FileSystem.createTempFile.

Like createTempFile(String, String, String, Handler) but returns a Future of the asynchronous result

public FileSystem
createTempFile(String
the path to directory in which to create the directory
dir
,
String
the prefix string to be used in generating the directory's name; may be null
prefix
,
String
the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
suffix
,
String
the permissions string
perms
,
Handler<AsyncResult<String>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.createTempFile.

Creates a new file in the directory provided by the path dir, using the given prefix and suffix to generate its name, asynchronously.

public Future<String>
createTempFile(String dir, String prefix, String suffix, String perms)

Implements io.vertx.core.file.FileSystem.createTempFile.

Like createTempFile(String, String, String, String, Handler) but returns a Future of the asynchronous result

public String
public String
public String
protected FileSystemImpl.BlockingAction<String>
createTempFileInternal(String parentDir, String prefix, String suffix, String perms)

public FileSystem
delete(String
path to the file
path
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.delete.

Deletes the file represented by the specified path, asynchronously.

public Future<Void>
delete(String path)

Implements io.vertx.core.file.FileSystem.delete.

Like delete(String, Handler) but returns a Future of the asynchronous result

public static void
delete(Path path, boolean recursive)

public FileSystem
private FileSystemImpl.BlockingAction<Void>
private FileSystemImpl.BlockingAction<Void>
deleteInternal(String path, boolean recursive)

public FileSystem
deleteRecursive(String
path to the file
path
,
boolean
delete recursively?
recursive
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.deleteRecursive.

Deletes the file represented by the specified path, asynchronously.

public Future<Void>
deleteRecursive(String path, boolean recursive)

Implements io.vertx.core.file.FileSystem.deleteRecursive.

Like deleteRecursive(String, boolean, Handler) but returns a Future of the asynchronous result

public FileSystem
protected AsyncFile
doOpen(String path, OpenOptions options, ContextInternal context)

public FileSystem
exists(String
path to the file
path
,
Handler<AsyncResult<Boolean>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.exists.

Determines whether the file as specified by the path path exists, asynchronously.

public Future<Boolean>
exists(String path)

Implements io.vertx.core.file.FileSystem.exists.

Like exists(String, Handler) but returns a Future of the asynchronous result

public boolean
private FileSystemImpl.BlockingAction<Boolean>
public FileSystem
fsProps(String
path to anywhere on the filesystem
path
,
Handler<AsyncResult<FileSystemProps>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.fsProps.

Returns properties of the file-system being used by the specified path, asynchronously.

public Future<FileSystemProps>
fsProps(String path)

Implements io.vertx.core.file.FileSystem.fsProps.

Like fsProps(String, Handler) but returns a Future of the asynchronous result

public FileSystemProps
private FileSystemImpl.BlockingAction<FileSystemProps>
pack-priv static String
pack-priv static String
pack-priv static String
pack-priv static String
pack-priv static String
public FileSystem
private FileSystemImpl.BlockingAction<Void>
linkInternal(String link, String existing)

public FileSystem
lprops(String
the path to the file
path
,
Handler<AsyncResult<FileProps>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.lprops.

Obtain properties for the link represented by path, asynchronously.

public Future<FileProps>
lprops(String path)

Implements io.vertx.core.file.FileSystem.lprops.

Like lprops(String, Handler) but returns a Future of the asynchronous result

public FileProps
private FileSystemImpl.BlockingAction<FileProps>
public FileSystem
mkdir(String
path to the file
path
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.mkdir.

Create the directory represented by path, asynchronously.

public Future<Void>
mkdir(String path)

Implements io.vertx.core.file.FileSystem.mkdir.

Like mkdir(String, Handler) but returns a Future of the asynchronous result

public FileSystem
mkdir(String
path to the file
path
,
String
the permissions string
perms
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.mkdir.

Create the directory represented by path, asynchronously.

public Future<Void>
mkdir(String path, String perms)

Implements io.vertx.core.file.FileSystem.mkdir.

Like mkdir(String, String, Handler) but returns a Future of the asynchronous result

public FileSystem
public FileSystem
private FileSystemImpl.BlockingAction<Void>
private FileSystemImpl.BlockingAction<Void>
mkdirInternal(String path, boolean createParents)

private FileSystemImpl.BlockingAction<Void>
protected FileSystemImpl.BlockingAction<Void>
mkdirInternal(String path, String perms, boolean createParents)

public FileSystem
mkdirs(String
path to the file
path
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.mkdirs.

Create the directory represented by path and any non existent parents, asynchronously.

public Future<Void>
mkdirs(String path)

Implements io.vertx.core.file.FileSystem.mkdirs.

Like mkdirs(String, Handler) but returns a Future of the asynchronous result

public FileSystem
mkdirs(String
path to the file
path
,
String
the permissions string
perms
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.mkdirs.

Create the directory represented by path and any non existent parents, asynchronously.

public Future<Void>
mkdirs(String path, String perms)

Implements io.vertx.core.file.FileSystem.mkdirs.

Like mkdirs(String, String, Handler) but returns a Future of the asynchronous result

public FileSystem
public FileSystem
public FileSystem
move(String
the path to copy from
from
,
String
the path to copy to
to
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.move.

Move a file from the path from to path to, asynchronously.

public Future<Void>
move(String from, String to)

Implements io.vertx.core.file.FileSystem.move.

Like move(String, String, Handler) but returns a Future of the asynchronous result

public FileSystem
move(String
the path to copy from
from
,
String
the path to copy to
to
,
CopyOptions
options describing how the file should be copied
options
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.move.

Move a file from the path from to path to, asynchronously.

public Future<Void>
move(String from, String to, CopyOptions options)

Implements io.vertx.core.file.FileSystem.move.

Like move(String, String, CopyOptions, Handler) but returns a Future of the asynchronous result

public FileSystem
private FileSystemImpl.BlockingAction<Void>
public FileSystem
open(String
path to the file
path
,
OpenOptions
options describing how the file should be opened
options
,
Handler<AsyncResult<AsyncFile>> handler)

Implements io.vertx.core.file.FileSystem.open.

Open the file represented by path, asynchronously.

public Future<AsyncFile>
open(String path, OpenOptions options)

Implements io.vertx.core.file.FileSystem.open.

Like open(String, OpenOptions, Handler) but returns a Future of the asynchronous result

public AsyncFile
private FileSystemImpl.BlockingAction<AsyncFile>
public FileSystem
props(String
the path to the file
path
,
Handler<AsyncResult<FileProps>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.props.

Obtain properties for the file represented by path, asynchronously.

public Future<FileProps>
props(String path)

Implements io.vertx.core.file.FileSystem.props.

Like props(String, Handler) but returns a Future of the asynchronous result

private FileSystemImpl.BlockingAction<FileProps>
props(String path, boolean followLinks)

public FileProps
private FileSystemImpl.BlockingAction<FileProps>
public FileSystem
readDir(String
path to the file
path
,
Handler<AsyncResult<List<String>>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.readDir.

Read the contents of the directory specified by path, asynchronously.

public Future<List<String>>
readDir(String path)

Implements io.vertx.core.file.FileSystem.readDir.

Like readDir(String, Handler) but returns a Future of the asynchronous result

public FileSystem
readDir(String
path to the directory
path
,
String
the filter expression
filter
,
Handler<AsyncResult<List<String>>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.readDir.

Read the contents of the directory specified by path, asynchronously.

public Future<List<String>>
readDir(String path, String filter)

Implements io.vertx.core.file.FileSystem.readDir.

Like readDir(String, Handler) but returns a Future of the asynchronous result

public List<String>
public List<String>
private FileSystemImpl.BlockingAction<List<String>>
private FileSystemImpl.BlockingAction<List<String>>
public FileSystem
readFile(String
path to the file
path
,
Handler<AsyncResult<Buffer>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.readFile.

Reads the entire file as represented by the path path as a Buffer, asynchronously.

public Future<Buffer>
readFile(String path)

Implements io.vertx.core.file.FileSystem.readFile.

Like readFile(String, Handler) but returns a Future of the asynchronous result

public Buffer
readFileBlocking(String path)

Implements io.vertx.core.file.FileSystem.readFileBlocking.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Blocking version of readFile(String, Handler)

private FileSystemImpl.BlockingAction<Buffer>
public String
private FileSystemImpl.BlockingAction<String>
public FileSystem
private FileSystemImpl.BlockingAction<Void>
symlinkInternal(String link, String existing)

pack-priv static Set<CopyOption>
public FileSystem
truncate(String
the path to the file
path
,
long
the length to truncate it to
len
,
Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.truncate.

Truncate the file represented by path to length len in bytes, asynchronously.

public Future<Void>
truncate(String path, long len)

Implements io.vertx.core.file.FileSystem.truncate.

Like truncate(String, long, Handler) but returns a Future of the asynchronous result

public FileSystem
private FileSystemImpl.BlockingAction<Void>
truncateInternal(String p, long len)

public FileSystem
private FileSystemImpl.BlockingAction<Void>
public FileSystem
writeFile(String
path to the file
path
,
Buffer data, Handler<AsyncResult<Void>>
the handler that will be called on completion
handler
)

Implements io.vertx.core.file.FileSystem.writeFile.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Creates the file, and writes the specified Buffer data to the file represented by the path path, asynchronously.

public Future<Void>
writeFile(String path, Buffer data)

Implements io.vertx.core.file.FileSystem.writeFile.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Like writeFile(String, Buffer, Handler) but returns a Future of the asynchronous result

public FileSystem
writeFileBlocking(String path, Buffer data)

Implements io.vertx.core.file.FileSystem.writeFileBlocking.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Blocking version of writeFile(String, Buffer, Handler)

private FileSystemImpl.BlockingAction<Void>
writeFileInternal(String path, Buffer data)
References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait