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
The $create()
factory methods instantiate the FileSystem
object and
take the following arguments, depending on the subclass:
no argument is needed for instantiating a LocalFileSystem
base_path
and base_fs
for instantiating a SubTreeFileSystem
$GetTargetStats(x)
: x
may be a Selector or a character
vector of paths. Returns a list of FileStats
$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.
Like $DeleteDir()
,
but doesn't delete the directory itself. Passing an empty path (""
) will
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
exists:
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
sequential reading.
$OpenInputFile(path)
: Open an input file for random
access reading.
$OpenOutputStream(path)
: Open an output stream for
sequential writing.
$OpenAppendStream(path)
: Open an output stream for
appending.
arrow::Object
-> FileSystem
GetTargetStats()
FileSystem$GetTargetStats(x)
CreateDir()
FileSystem$CreateDir(path, recursive = TRUE)
DeleteDir()
FileSystem$DeleteDir(path)
DeleteDirContents()
FileSystem$DeleteDirContents(path)
DeleteFile()
FileSystem$DeleteFile(path)
DeleteFiles()
FileSystem$DeleteFiles(paths)
Move()
FileSystem$Move(src, dest)
CopyFile()
FileSystem$CopyFile(src, dest)
OpenInputStream()
FileSystem$OpenInputStream(path)
OpenInputFile()
FileSystem$OpenInputFile(path)
OpenOutputStream()
FileSystem$OpenOutputStream(path)
OpenAppendStream()
FileSystem$OpenAppendStream(path)
clone()
The objects of this class are cloneable with this method.
FileSystem$clone(deep = FALSE)
deep
Whether to make a deep clone.
arrow::Object
-> arrow::FileSystem
-> LocalFileSystem
Inherited methods
clone()
The objects of this class are cloneable with this method.
LocalFileSystem$clone(deep = FALSE)
deep
Whether to make a deep clone.
arrow::Object
-> arrow::FileSystem
-> SubTreeFileSystem
Inherited methods
clone()
The objects of this class are cloneable with this method.
SubTreeFileSystem$clone(deep = FALSE)
deep
Whether to make a deep clone.