FileSystem is an abstract file system API,
LocalFileSystem is an implementation accessing files
on the local machine.
SubTreeFileSystem is an implementation that delegates
to another implementation after prepending a fixed base path
LocalFileSystem$create() returns the object and takes no arguments.
SubTreeFileSystem$create() takes the following arguments:
base_path, a string path
S3FileSystem$create() optionally takes arguments:
anonymous: logical, default
FALSE. If true, will not attempt to look up
credentials using standard AWS configuration methods.
secret_key: authentication credentials. If one is provided,
the other must be as well. If both are provided, they will override any
AWS configuration set at the environment level.
session_token: optional string for authentication along with
role_arn: string AWS ARN of an AccessRole. If provided instead of
secret_key, temporary credentials will be fetched by assuming this role.
session_name: optional string identifier for the assumed role session.
external_id: optional unique string identifier that might be required
when you assume a role in another account.
load_frequency: integer, frequency (in seconds) with which temporary
credentials from an assumed role session will be refreshed. Default is
900 (i.e. 15 minutes)
region: AWS region to connect to. If omitted, the AWS library will
provide a sensible default based on client configuration, falling back
to "us-east-1" if no other alternatives are found.
endpoint_override: If non-empty, override region with a connect string
such as "localhost:9000". This is useful for connecting to file systems
that emulate S3.
scheme: S3 connection transport (default "https")
background_writes: logical, whether
OutputStream writes will be issued
in the background, without blocking (default
$CreateDir(path, recursive = TRUE): Create a directory and subdirectories.
$DeleteDir(path): Delete a directory and its contents, recursively.
$DeleteDirContents(path): Delete a directory's contents, recursively.
but doesn't delete the directory itself. Passing an empty path (
wipe the entire filesystem tree.
$DeleteFile(path) : Delete a file.
$DeleteFiles(paths) : Delete many files. The default implementation
issues individual delete operations in sequence.
$Move(src, dest): Move / rename a file or directory. If the destination
if it is a non-empty directory, an error is returned
otherwise, if it has the same type as the source, it is replaced
otherwise, behavior is unspecified (implementation-dependent).
$CopyFile(src, dest): Copy a file. If the destination exists and is a
directory, an error is returned. Otherwise, it is replaced.
$OpenInputStream(path): Open an input stream for
$OpenInputFile(path): Open an input file for random
$OpenOutputStream(path): Open an output stream for
$OpenAppendStream(path): Open an output stream for
$type_name: string filesystem type name, such as "local", "s3", etc.
$region: string AWS region, for
FileSystem it contains
SubTreeFileSystem, the path in
$base_fs which is considered
root in this