public class DefaultProjectFilesystem extends Object implements Cloneable, ProjectFilesystem
Modifier and Type | Field and Description |
---|---|
protected boolean |
ignoreValidityOfPaths |
Modifier | Constructor and Description |
---|---|
|
DefaultProjectFilesystem(AbsPath root,
com.google.common.collect.ImmutableSet<PathMatcher> blackListedPaths,
BuckPaths buckPaths,
ProjectFilesystemDelegate delegate,
ProjectFilesystemDelegatePair delegatePair,
WindowsFS winFSInstance) |
|
DefaultProjectFilesystem(AbsPath root,
com.google.common.collect.ImmutableSet<PathMatcher> blackListedPaths,
BuckPaths buckPaths,
ProjectFilesystemDelegate delegate,
WindowsFS winFSInstance) |
protected |
DefaultProjectFilesystem(CanonicalCellName cellName,
AbsPath root,
ProjectFilesystemDelegate delegate,
WindowsFS winFSInstance,
boolean buckOutIncludeTargetConfigHash)
This function should be only used in tests, because it ignores hashes-in-path buckconfig.
|
Modifier and Type | Method and Description |
---|---|
DefaultProjectFilesystemView |
asView() |
DefaultProjectFilesystem |
clone() |
Sha1HashCode |
computeSha1(Path pathRelativeToProjectRootOrJustAbsolute) |
String |
computeSha256(Path pathRelativeToProjectRoot) |
void |
copy(Path source,
Path target,
CopySourceMode sourceMode) |
void |
copyFile(Path source,
Path target) |
void |
copyFolder(Path source,
Path target) |
void |
copyToOutputStream(Path pathRelativeToProjectRoot,
OutputStream out)
Copies a file to an output stream.
|
void |
copyToPath(InputStream inputStream,
Path pathRelativeToProjectRoot,
CopyOption... options) |
DefaultProjectFilesystem |
createBuckOutProjectFilesystem() |
Path |
createNewFile(Path pathRelativeToProjectRoot)
Creates a new file relative to the project root.
|
void |
createParentDirs(Path pathRelativeToProjectRoot) |
void |
createParentDirs(String pathRelativeToProjectRoot)
// @deprecated Prefer operating on
Path s directly, replaced by createParentDirs(java.nio.file.Path) . |
void |
createSymLink(Path symLink,
Path realFile,
boolean force) |
Path |
createTempFile(Path directory,
String prefix,
String suffix,
FileAttribute<?>... attrs)
Prefer
createTempFile(String, String, FileAttribute[]) so that temporary files are
guaranteed to be created under buck-out . |
Path |
createTempFile(String prefix,
String suffix,
FileAttribute<?>... attrs)
Returns a relative path whose parent directory is guaranteed to exist.
|
void |
deleteFileAtPath(Path pathRelativeToProjectRoot)
Deletes a file specified by its path relative to the project root.
|
boolean |
deleteFileAtPathIfExists(Path pathRelativeToProjectRoot)
Deletes a file specified by its path relative to the project root.
|
void |
deleteRecursivelyIfExists(Path pathRelativeToProjectRoot)
Recursively delete everything under the specified path.
|
boolean |
equals(Object other) |
boolean |
exists(Path pathRelativeToProjectRoot,
LinkOption... options) |
com.google.common.collect.ImmutableSet<PathMatcher> |
getBlacklistedPaths() |
BuckPaths |
getBuckPaths() |
static Path |
getCacheDir(Path root,
Optional<String> value,
BuckPaths buckPaths) |
com.google.common.collect.ImmutableMap<String,? extends Object> |
getDelegateDetails() |
com.google.common.collect.ImmutableCollection<Path> |
getDirectoryContents(Path pathToUse)
Use
ProjectFilesystemView.getDirectoryContents(Path) instead |
long |
getFileAttributesForZipEntry(Path path)
getFileAttributesForZipEntry is similar to getPosixFileMode, but returns a number adjusted for
use in zip files.
|
long |
getFileSize(Path pathRelativeToProjectRoot) |
com.google.common.collect.ImmutableSet<Path> |
getFilesUnderPath(Path pathRelativeToProjectRoot)
|
com.google.common.collect.ImmutableSet<Path> |
getFilesUnderPath(Path pathRelativeToProjectRoot,
java.util.function.Predicate<Path> predicate)
|
com.google.common.collect.ImmutableSet<Path> |
getFilesUnderPath(Path pathRelativeToProjectRoot,
java.util.function.Predicate<Path> predicate,
EnumSet<FileVisitOption> visitOptions)
|
com.google.common.collect.ImmutableSet<PathMatcher> |
getIgnorePaths() |
InputStream |
getInputStreamForRelativePath(Path path)
// @deprecated Prefer operation on
Path s directly, replaced by Files.newInputStream(java.nio.file.Path, java.nio.file.OpenOption...) . |
Manifest |
getJarManifest(Path path) |
FileTime |
getLastModifiedTime(Path pathRelativeToProjectRoot) |
protected PathListing.PathModifiedTimeFetcher |
getLastModifiedTimeFetcher() |
com.google.common.collect.ImmutableSortedSet<Path> |
getMtimeSortedMatchingDirectoryContents(Path pathRelativeToProjectRoot,
String globPattern)
Returns the files inside
pathRelativeToProjectRoot which match globPattern ,
ordered in descending last modified time order. |
Path |
getPath(String first,
String... rest)
Converts a path string (or sequence of strings) to a Path with the same VFS as this instance.
|
Path |
getPathForRelativeExistingPath(Path pathRelativeToProjectRoot)
As
getPathForRelativePath(java.nio.file.Path) , but with the added twist that the
existence of the path is checked before returning. |
Path |
getPathForRelativePath(Path pathRelativeToProjectRoot) |
Path |
getPathForRelativePath(String pathRelativeToProjectRoot) |
Optional<Path> |
getPathRelativeToProjectRoot(Path path) |
long |
getPosixFileMode(Path path)
getPosixFileMode returns a number corresponding to stat()'s ST_MODE, for use when constructing
tar archives.
|
Set<PosixFilePermission> |
getPosixFilePermissions(Path path)
Returns the set of POSIX file permissions, or the empty set if the underlying file system does
not support POSIX file attributes.
|
AbsPath |
getRootPath() |
int |
hashCode() |
boolean |
isDirectory(Path child,
LinkOption... linkOptions)
Allows
Files.isDirectory(java.nio.file.Path, java.nio.file.LinkOption...) to be faked in tests. |
boolean |
isExecutable(Path child)
Allows
Files.isExecutable(java.nio.file.Path) to be faked in tests. |
boolean |
isFile(Path pathRelativeToProjectRoot,
LinkOption... options)
Checks whether there is a normal file at the specified path.
|
boolean |
isHidden(Path pathRelativeToProjectRoot) |
boolean |
isIgnored(RelPath path)
Use
ProjectFilesystemView.isIgnored(Path) instead |
boolean |
isSymLink(Path path)
Returns true if the file under
path exists and is a symbolic link, false otherwise. |
void |
mergeChildren(Path source,
Path target,
CopyOption... options)
Moves the children of
source into target , merging the two directories. |
void |
mkdirs(Path pathRelativeToProjectRoot)
Resolves the relative path against the project root and then calls
Files.createDirectories(java.nio.file.Path, java.nio.file.attribute.FileAttribute[]) |
void |
move(Path source,
Path target,
CopyOption... options) |
InputStream |
newFileInputStream(Path pathRelativeToProjectRoot) |
OutputStream |
newFileOutputStream(Path pathRelativeToProjectRoot,
boolean append,
FileAttribute<?>... attrs) |
OutputStream |
newFileOutputStream(Path pathRelativeToProjectRoot,
FileAttribute<?>... attrs) |
OutputStream |
newUnbufferedFileOutputStream(Path pathRelativeToProjectRoot,
boolean append,
FileAttribute<?>... attrs) |
<A extends BasicFileAttributes> |
readAttributes(Path pathRelativeToProjectRoot,
Class<A> type,
LinkOption... options) |
Optional<String> |
readFileIfItExists(Path pathRelativeToProjectRoot) |
Optional<String> |
readFirstLine(Path pathRelativeToProjectRoot)
Attempts to read the first line of the file specified by the relative path.
|
Optional<String> |
readFirstLine(String pathRelativeToProjectRoot)
Attempts to read the first line of the file specified by the relative path.
|
Optional<String> |
readFirstLineFromFile(Path file)
Attempts to read the first line of the specified file.
|
List<String> |
readLines(Path pathRelativeToProjectRoot) |
Properties |
readPropertiesFile(Path propertiesFile) |
Path |
readSymLink(Path path)
Returns the target of the specified symbolic link.
|
RelPath |
relativize(Path path)
Construct a relative path between the project root and a given path.
|
Path |
resolve(Path path) |
Path |
resolve(String path) |
Path |
setLastModifiedTime(Path pathRelativeToProjectRoot,
FileTime time)
Sets the last modified time for the given path.
|
protected boolean |
shouldVerifyConstructorArguments()
For testing purposes, subclasses might want to skip some of the verification done by the
constructor on its arguments.
|
String |
toString() |
void |
touch(Path fileToTouch) |
protected DefaultProjectFilesystem |
useBuckOutProjectDelegate() |
void |
walkFileTree(Path root,
FileVisitor<Path> fileVisitor)
|
void |
walkFileTree(Path root,
Set<FileVisitOption> options,
FileVisitor<Path> fileVisitor)
|
void |
walkRelativeFileTree(Path pathRelativeToProjectRoot,
EnumSet<FileVisitOption> visitOptions,
FileVisitor<Path> fileVisitor,
boolean skipIgnored)
Walks a project-root relative file tree with a visitor and visit options.
|
void |
walkRelativeFileTree(Path pathRelativeToProjectRoot,
FileVisitor<Path> fileVisitor)
Similar to
walkFileTree(Path, FileVisitor) except this takes in a path relative to the
project root. |
void |
walkRelativeFileTree(Path pathRelativeToProjectRoot,
FileVisitor<Path> fileVisitor,
boolean skipIgnored)
Similar to
ProjectFilesystem.walkFileTree(Path, FileVisitor) except this takes in a path relative to the
project root. |
void |
writeBytesToPath(byte[] bytes,
Path pathRelativeToProjectRoot,
FileAttribute<?>... attrs) |
void |
writeContentsToPath(String contents,
Path pathRelativeToProjectRoot,
FileAttribute<?>... attrs) |
void |
writeLinesToPath(Iterable<String> lines,
Path pathRelativeToProjectRoot,
FileAttribute<?>... attrs)
Writes each line in
lines with a trailing newline to a file at the specified path. |
finalize, getClass, notify, notifyAll, wait, wait, wait
createSymLink, exists, exists, getFileSystem, isDirectory, isFile, newFileInputStream, relativize, resolve, resolve
protected DefaultProjectFilesystem(CanonicalCellName cellName, AbsPath root, ProjectFilesystemDelegate delegate, @Nullable WindowsFS winFSInstance, boolean buckOutIncludeTargetConfigHash)
public DefaultProjectFilesystem(AbsPath root, com.google.common.collect.ImmutableSet<PathMatcher> blackListedPaths, BuckPaths buckPaths, ProjectFilesystemDelegate delegate, @Nullable WindowsFS winFSInstance)
public DefaultProjectFilesystem(AbsPath root, com.google.common.collect.ImmutableSet<PathMatcher> blackListedPaths, BuckPaths buckPaths, ProjectFilesystemDelegate delegate, ProjectFilesystemDelegatePair delegatePair, @Nullable WindowsFS winFSInstance)
protected boolean shouldVerifyConstructorArguments()
public DefaultProjectFilesystem clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
protected DefaultProjectFilesystem useBuckOutProjectDelegate()
public DefaultProjectFilesystem createBuckOutProjectFilesystem()
createBuckOutProjectFilesystem
in interface ProjectFilesystem
public DefaultProjectFilesystemView asView()
asView
in interface ProjectFilesystem
public final AbsPath getRootPath()
getRootPath
in interface ProjectFilesystem
public com.google.common.collect.ImmutableMap<String,? extends Object> getDelegateDetails()
getDelegateDetails
in interface ProjectFilesystem
String
, int
, or boolean
.public Path resolve(Path path)
resolve
in interface ProjectFilesystem
path
resolved against getRootPath()
to an absolute path.public Path resolve(String path)
resolve
in interface ProjectFilesystem
public RelPath relativize(Path path)
relativize
in interface ProjectFilesystem
public com.google.common.collect.ImmutableSet<PathMatcher> getBlacklistedPaths()
getBlacklistedPaths
in interface ProjectFilesystem
PathMatcher
objects ignored by ProjectFilesystem.isIgnored(RelPath)
public com.google.common.collect.ImmutableSet<PathMatcher> getIgnorePaths()
getIgnorePaths
in interface ProjectFilesystem
ImmutableSet
of PathMatcher
objects to have buck ignore.public Path getPathForRelativePath(Path pathRelativeToProjectRoot)
getPathForRelativePath
in interface ProjectFilesystem
public Path getPathForRelativePath(String pathRelativeToProjectRoot)
getPathForRelativePath
in interface ProjectFilesystem
public Optional<Path> getPathRelativeToProjectRoot(Path path)
getPathRelativeToProjectRoot
in interface ProjectFilesystem
path
- Absolute path or path relative to the project root.path
is relative, it is returned. If it is absolute and is inside the
project root, it is relativized to the project root and returned. Otherwise an absent value
is returned.public Path getPathForRelativeExistingPath(Path pathRelativeToProjectRoot)
getPathForRelativePath(java.nio.file.Path)
, but with the added twist that the
existence of the path is checked before returning.getPathForRelativeExistingPath
in interface ProjectFilesystem
public boolean exists(Path pathRelativeToProjectRoot, LinkOption... options)
exists
in interface ProjectFilesystem
public long getFileSize(Path pathRelativeToProjectRoot) throws IOException
getFileSize
in interface ProjectFilesystem
IOException
public boolean deleteFileAtPathIfExists(Path pathRelativeToProjectRoot) throws IOException
Ignores the failure if the file does not exist.
deleteFileAtPathIfExists
in interface ProjectFilesystem
pathRelativeToProjectRoot
- path to the filetrue
if the file was deleted, false
if it did not existIOException
public void deleteFileAtPath(Path pathRelativeToProjectRoot) throws IOException
deleteFileAtPath
in interface ProjectFilesystem
pathRelativeToProjectRoot
- path to the fileIOException
public Properties readPropertiesFile(Path propertiesFile) throws IOException
readPropertiesFile
in interface ProjectFilesystem
IOException
public boolean isFile(Path pathRelativeToProjectRoot, LinkOption... options)
isFile
in interface ProjectFilesystem
public boolean isHidden(Path pathRelativeToProjectRoot) throws IOException
isHidden
in interface ProjectFilesystem
IOException
public void walkRelativeFileTree(Path pathRelativeToProjectRoot, FileVisitor<Path> fileVisitor) throws IOException
walkFileTree(Path, FileVisitor)
except this takes in a path relative to the
project root.walkRelativeFileTree
in interface ProjectFilesystem
IOException
public void walkRelativeFileTree(Path pathRelativeToProjectRoot, FileVisitor<Path> fileVisitor, boolean skipIgnored) throws IOException
ProjectFilesystem
ProjectFilesystem.walkFileTree(Path, FileVisitor)
except this takes in a path relative to the
project root.
This is deprecated. Please use ProjectFilesystemView.walkRelativeFileTree(Path,
EnumSet, FileVisitor)
instead.
walkRelativeFileTree
in interface ProjectFilesystem
IOException
public void walkRelativeFileTree(Path pathRelativeToProjectRoot, EnumSet<FileVisitOption> visitOptions, FileVisitor<Path> fileVisitor, boolean skipIgnored) throws IOException
walkRelativeFileTree
in interface ProjectFilesystem
IOException
public void walkFileTree(Path root, FileVisitor<Path> fileVisitor) throws IOException
Files.walkFileTree(java.nio.file.Path, java.util.Set<java.nio.file.FileVisitOption>, int, java.nio.file.FileVisitor<? super java.nio.file.Path>)
to be faked in tests.walkFileTree
in interface ProjectFilesystem
IOException
public void walkFileTree(Path root, Set<FileVisitOption> options, FileVisitor<Path> fileVisitor) throws IOException
ProjectFilesystem
walkFileTree
in interface ProjectFilesystem
IOException
public com.google.common.collect.ImmutableSet<Path> getFilesUnderPath(Path pathRelativeToProjectRoot) throws IOException
ProjectFilesystem
getFilesUnderPath
in interface ProjectFilesystem
IOException
public com.google.common.collect.ImmutableSet<Path> getFilesUnderPath(Path pathRelativeToProjectRoot, java.util.function.Predicate<Path> predicate) throws IOException
ProjectFilesystem
ProjectFilesystemView.getFilesUnderPath(Path, com.google.common.base.Predicate,
EnumSet)
insteadgetFilesUnderPath
in interface ProjectFilesystem
IOException
public com.google.common.collect.ImmutableSet<Path> getFilesUnderPath(Path pathRelativeToProjectRoot, java.util.function.Predicate<Path> predicate, EnumSet<FileVisitOption> visitOptions) throws IOException
ProjectFilesystem
ProjectFilesystemView.getFilesUnderPath(Path, com.google.common.base.Predicate,
EnumSet)
insteadgetFilesUnderPath
in interface ProjectFilesystem
IOException
public boolean isDirectory(Path child, LinkOption... linkOptions)
Files.isDirectory(java.nio.file.Path, java.nio.file.LinkOption...)
to be faked in tests.isDirectory
in interface ProjectFilesystem
public boolean isExecutable(Path child)
Files.isExecutable(java.nio.file.Path)
to be faked in tests.isExecutable
in interface ProjectFilesystem
public com.google.common.collect.ImmutableCollection<Path> getDirectoryContents(Path pathToUse) throws IOException
ProjectFilesystem
ProjectFilesystemView.getDirectoryContents(Path)
insteadgetDirectoryContents
in interface ProjectFilesystem
IOException
protected PathListing.PathModifiedTimeFetcher getLastModifiedTimeFetcher()
public com.google.common.collect.ImmutableSortedSet<Path> getMtimeSortedMatchingDirectoryContents(Path pathRelativeToProjectRoot, String globPattern) throws IOException
pathRelativeToProjectRoot
which match globPattern
,
ordered in descending last modified time order. This will not obey the results of ProjectFilesystem.isIgnored(RelPath)
.getMtimeSortedMatchingDirectoryContents
in interface ProjectFilesystem
IOException
public FileTime getLastModifiedTime(Path pathRelativeToProjectRoot) throws IOException
getLastModifiedTime
in interface ProjectFilesystem
IOException
public Path setLastModifiedTime(Path pathRelativeToProjectRoot, FileTime time) throws IOException
setLastModifiedTime
in interface ProjectFilesystem
IOException
public void deleteRecursivelyIfExists(Path pathRelativeToProjectRoot) throws IOException
deleteRecursivelyIfExists
in interface ProjectFilesystem
IOException
public void mkdirs(Path pathRelativeToProjectRoot) throws IOException
Files.createDirectories(java.nio.file.Path, java.nio.file.attribute.FileAttribute[])
mkdirs
in interface ProjectFilesystem
IOException
public Path createNewFile(Path pathRelativeToProjectRoot) throws IOException
createNewFile
in interface ProjectFilesystem
IOException
public void createParentDirs(String pathRelativeToProjectRoot) throws IOException
Path
s directly, replaced by createParentDirs(java.nio.file.Path)
.createParentDirs
in interface ProjectFilesystem
IOException
public void createParentDirs(Path pathRelativeToProjectRoot) throws IOException
createParentDirs
in interface ProjectFilesystem
pathRelativeToProjectRoot
- Must identify a file, not a directory. (Unfortunately, we have
no way to assert this because the path is not expected to exist yet.)IOException
public void writeLinesToPath(Iterable<String> lines, Path pathRelativeToProjectRoot, FileAttribute<?>... attrs) throws IOException
lines
with a trailing newline to a file at the specified path.
The parent path of pathRelativeToProjectRoot
must exist.
writeLinesToPath
in interface ProjectFilesystem
IOException
public void writeContentsToPath(String contents, Path pathRelativeToProjectRoot, FileAttribute<?>... attrs) throws IOException
writeContentsToPath
in interface ProjectFilesystem
IOException
public void writeBytesToPath(byte[] bytes, Path pathRelativeToProjectRoot, FileAttribute<?>... attrs) throws IOException
writeBytesToPath
in interface ProjectFilesystem
IOException
public OutputStream newFileOutputStream(Path pathRelativeToProjectRoot, FileAttribute<?>... attrs) throws IOException
newFileOutputStream
in interface ProjectFilesystem
IOException
public OutputStream newFileOutputStream(Path pathRelativeToProjectRoot, boolean append, FileAttribute<?>... attrs) throws IOException
newFileOutputStream
in interface ProjectFilesystem
IOException
public OutputStream newUnbufferedFileOutputStream(Path pathRelativeToProjectRoot, boolean append, FileAttribute<?>... attrs) throws IOException
newUnbufferedFileOutputStream
in interface ProjectFilesystem
IOException
public <A extends BasicFileAttributes> A readAttributes(Path pathRelativeToProjectRoot, Class<A> type, LinkOption... options) throws IOException
readAttributes
in interface ProjectFilesystem
IOException
public InputStream newFileInputStream(Path pathRelativeToProjectRoot) throws IOException
newFileInputStream
in interface ProjectFilesystem
IOException
public void copyToPath(InputStream inputStream, Path pathRelativeToProjectRoot, CopyOption... options) throws IOException
copyToPath
in interface ProjectFilesystem
inputStream
- Source of the bytes. This method does not close this stream.IOException
public void copyToOutputStream(Path pathRelativeToProjectRoot, OutputStream out) throws IOException
copyToOutputStream
in interface ProjectFilesystem
IOException
public Optional<String> readFileIfItExists(Path pathRelativeToProjectRoot)
readFileIfItExists
in interface ProjectFilesystem
public Optional<String> readFirstLine(String pathRelativeToProjectRoot)
Optional.empty()
is
returned. Otherwise, an Optional
with the first line of the file will be returned.
// @deprecated PRefero operation on Path
s directly, replaced by readFirstLine(java.nio.file.Path)
readFirstLine
in interface ProjectFilesystem
public Optional<String> readFirstLine(Path pathRelativeToProjectRoot)
Optional.empty()
is
returned. Otherwise, an Optional
with the first line of the file will be returned.readFirstLine
in interface ProjectFilesystem
public Optional<String> readFirstLineFromFile(Path file)
Optional.empty()
is returned. Otherwise, an
Optional
with the first line of the file will be returned.readFirstLineFromFile
in interface ProjectFilesystem
public List<String> readLines(Path pathRelativeToProjectRoot) throws IOException
readLines
in interface ProjectFilesystem
IOException
public InputStream getInputStreamForRelativePath(Path path) throws IOException
Path
s directly, replaced by Files.newInputStream(java.nio.file.Path, java.nio.file.OpenOption...)
.getInputStreamForRelativePath
in interface ProjectFilesystem
IOException
public Sha1HashCode computeSha1(Path pathRelativeToProjectRootOrJustAbsolute) throws IOException
computeSha1
in interface ProjectFilesystem
IOException
public String computeSha256(Path pathRelativeToProjectRoot) throws IOException
computeSha256
in interface ProjectFilesystem
IOException
public void copy(Path source, Path target, CopySourceMode sourceMode) throws IOException
copy
in interface ProjectFilesystem
IOException
public void move(Path source, Path target, CopyOption... options) throws IOException
move
in interface ProjectFilesystem
IOException
public void mergeChildren(Path source, Path target, CopyOption... options) throws IOException
ProjectFilesystem
source
into target
, merging the two directories.mergeChildren
in interface ProjectFilesystem
IOException
public void copyFolder(Path source, Path target) throws IOException
copyFolder
in interface ProjectFilesystem
IOException
public void copyFile(Path source, Path target) throws IOException
copyFile
in interface ProjectFilesystem
IOException
public void createSymLink(Path symLink, Path realFile, boolean force) throws IOException
createSymLink
in interface ProjectFilesystem
IOException
public Set<PosixFilePermission> getPosixFilePermissions(Path path) throws IOException
getPosixFilePermissions
in interface ProjectFilesystem
IOException
public boolean isSymLink(Path path)
path
exists and is a symbolic link, false otherwise.isSymLink
in interface ProjectFilesystem
public Path readSymLink(Path path) throws IOException
readSymLink
in interface ProjectFilesystem
IOException
public Manifest getJarManifest(Path path) throws IOException
getJarManifest
in interface ProjectFilesystem
IOException
public long getPosixFileMode(Path path) throws IOException
ProjectFilesystem
getPosixFileMode
in interface ProjectFilesystem
IOException
public long getFileAttributesForZipEntry(Path path) throws IOException
ProjectFilesystem
getFileAttributesForZipEntry
in interface ProjectFilesystem
IOException
public BuckPaths getBuckPaths()
getBuckPaths
in interface ProjectFilesystem
public boolean isIgnored(RelPath path)
ProjectFilesystem
ProjectFilesystemView.isIgnored(Path)
insteadisIgnored
in interface ProjectFilesystem
path
- the path to check.public Path createTempFile(String prefix, String suffix, FileAttribute<?>... attrs) throws IOException
buck-out
, so it is safe to write to.createTempFile
in interface ProjectFilesystem
IOException
public Path createTempFile(Path directory, String prefix, String suffix, FileAttribute<?>... attrs) throws IOException
createTempFile(String, String, FileAttribute[])
so that temporary files are
guaranteed to be created under buck-out
. This method will be deprecated once t12079608
is resolved.createTempFile
in interface ProjectFilesystem
IOException
public void touch(Path fileToTouch) throws IOException
touch
in interface ProjectFilesystem
IOException
public Path getPath(String first, String... rest)
getPath
in interface ProjectFilesystem
FileSystem.getPath(String, String...)