diff options
author | Nathan Harmata <nharmata@google.com> | 2015-10-20 21:54:34 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@google.com> | 2015-10-21 14:39:08 +0000 |
commit | d8b6ff2dad1de2d98a407ecf67a34fe12e67d494 (patch) | |
tree | 030c5ebb89ca5835e76854ed51c0d2a75b04e4e3 /src/main/java/com/google/devtools/build/lib/vfs/Dirent.java | |
parent | 11ef8fc44821fb593a512eb5a3423013abbe39aa (diff) |
Introduce Path#isSpecialFile, FileSystem#isSpecialFile, and FileStatus#isSpecialFile to help disambiguate between a regular file and a special file, since the file size of a special file cannot be trusted.
--
MOS_MIGRATED_REVID=105903622
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/vfs/Dirent.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/vfs/Dirent.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/Dirent.java b/src/main/java/com/google/devtools/build/lib/vfs/Dirent.java index 49d41a119b..2b81c831c8 100644 --- a/src/main/java/com/google/devtools/build/lib/vfs/Dirent.java +++ b/src/main/java/com/google/devtools/build/lib/vfs/Dirent.java @@ -25,9 +25,13 @@ public class Dirent implements Serializable { /** Type of the directory entry */ public enum Type { + // A regular file. FILE, + // A directory. DIRECTORY, + // A symlink. SYMLINK, + // Not one of the above. For example, a special file. UNKNOWN; } |