public class SkylarkFilesystem
extends com.google.devtools.build.lib.vfs.JavaIoFileSystem
FileSystem
implementation that uses underlying ProjectFilesystem
to resolve
Path
s to Path
and perform most of the operations by delegation.
Skylark uses its own FileSystem
API, which operates on Path
abstraction not
used anywhere else in Buck, but it should be based on ProjectFilesystem
for
interoperability.
Ideally JavaIoFileSystem
should be extended, but
unfortunately it resolves all paths to File
instead of Path
which means that it wouldn't play nicely with in-memory ProjectFilesystem
.
Since every method has to resolve Path
into Path
, it might
become expensive or cause excessive allocations, so caching might be beneficial.
Modifier and Type | Method and Description |
---|---|
protected Path |
getNioPath(com.google.devtools.build.lib.vfs.Path path) |
static SkylarkFilesystem |
using(ProjectFilesystem projectFilesystem) |
createDirectory, createDirectoryAndParents, createFSDependentHardLink, createSymbolicLink, delete, exists, fileIsSymbolicLink, getDigest, getDirectoryEntries, getFileSize, getIoFile, getLastModifiedTime, isExecutable, isFilePathCaseSensitive, isReadable, isWritable, readSymbolicLink, renameTo, setExecutable, setLastModifiedTime, setReadable, setWritable, stat, statIfFound, supportsHardLinksNatively, supportsModifications, supportsSymbolicLinksNatively
isDirectory, isFile, isSpecialFile, isSymbolicLink
createFileOutputStream, getInputStream, getOutputStream
appendSegment, chmod, createHardLink, deleteTree, deleteTreesBelow, direntFromStat, exists, getDigestFunction, getFastDigest, getFileSystemType, getOutputStream, getPath, getPath, getxattr, prefetchPackageAsync, readdir, readSymbolicLinkUnchecked, resolveOneLink, resolveSymbolicLinks, statNullable
protected Path getNioPath(com.google.devtools.build.lib.vfs.Path path)
getNioPath
in class com.google.devtools.build.lib.vfs.JavaIoFileSystem
public static SkylarkFilesystem using(ProjectFilesystem projectFilesystem)
SkylarkFilesystem
which methods