Class DefaultProjectFilesystemDelegate
- java.lang.Object
-
- com.facebook.buck.io.filesystem.impl.DefaultProjectFilesystemDelegate
-
- All Implemented Interfaces:
ProjectFilesystemDelegate
public final class DefaultProjectFilesystemDelegate extends Object implements ProjectFilesystemDelegate
Default implementation ofProjectFilesystemDelegate
that talks to the filesystem via standard Java APIs.
-
-
Constructor Summary
Constructors Constructor Description DefaultProjectFilesystemDelegate(Path root)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sha1HashCode
computeSha1(Path pathRelativeToProjectRootOrJustAbsolute)
boolean
exists(Path pathRelativeToProjectRoot, LinkOption... options)
com.google.common.collect.ImmutableMap<String,? extends Object>
getDetailsForLogging()
Path
getPathForRelativePath(Path pathRelativeToProjectRoot)
boolean
isExecutable(Path child)
boolean
isSymlink(Path path)
-
-
-
Constructor Detail
-
DefaultProjectFilesystemDelegate
public DefaultProjectFilesystemDelegate(Path root)
-
-
Method Detail
-
getDetailsForLogging
public com.google.common.collect.ImmutableMap<String,? extends Object> getDetailsForLogging()
- Specified by:
getDetailsForLogging
in interfaceProjectFilesystemDelegate
- Returns:
- details about the delegate suitable for writing to a logger. It is recommended that the
keys of this map are unique in namespace of the things a logger may want to log. Values
must be
String
,int
, orboolean
.
-
computeSha1
public Sha1HashCode computeSha1(Path pathRelativeToProjectRootOrJustAbsolute) throws IOException
- Specified by:
computeSha1
in interfaceProjectFilesystemDelegate
- Throws:
IOException
-
getPathForRelativePath
public Path getPathForRelativePath(Path pathRelativeToProjectRoot)
- Specified by:
getPathForRelativePath
in interfaceProjectFilesystemDelegate
-
isExecutable
public boolean isExecutable(Path child)
- Specified by:
isExecutable
in interfaceProjectFilesystemDelegate
-
isSymlink
public boolean isSymlink(Path path)
- Specified by:
isSymlink
in interfaceProjectFilesystemDelegate
-
exists
public boolean exists(Path pathRelativeToProjectRoot, LinkOption... options)
- Specified by:
exists
in interfaceProjectFilesystemDelegate
-
-