diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java index 8d849e09fd..0c45cf1bcd 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java @@ -59,11 +59,20 @@ public abstract class FileValue implements SkyValue { } /** - * Returns true if this value corresponds to a file or symlink to an existing file. If so, its - * parent directory is guaranteed to exist. + * Returns true if this value corresponds to a file or symlink to an existing regular or special + * file. If so, its parent directory is guaranteed to exist. */ public boolean isFile() { - return realFileStateValue().getType() == Type.FILE; + return realFileStateValue().getType() == Type.REGULAR_FILE + || realFileStateValue().getType() == Type.SPECIAL_FILE; + } + + /** + * Returns true if this value corresponds to a file or symlink to an existing special file. If so, + * its parent directory is guaranteed to exist. + */ + public boolean isSpecialFile() { + return realFileStateValue().getType() == Type.SPECIAL_FILE; } /** |