diff --git a/src/add-ons/kernel/file_systems/bfs/Inode.h b/src/add-ons/kernel/file_systems/bfs/Inode.h index 692bbf3c08..2945063765 100644 --- a/src/add-ons/kernel/file_systems/bfs/Inode.h +++ b/src/add-ons/kernel/file_systems/bfs/Inode.h @@ -39,7 +39,9 @@ class AttributeIterator; enum inode_type { S_DIRECTORY = S_IFDIR, S_FILE = S_IFREG, - S_SYMLINK = S_IFLNK + S_SYMLINK = S_IFLNK, + + S_REGULAR = (S_DIRECTORY | S_FILE | S_SYMLINK), }; @@ -140,6 +142,9 @@ class Inode : public CachedBlock { bool IsIndex() const { return (Mode() & (S_INDEX_DIR | 0777)) == S_INDEX_DIR; } // that's a stupid check, but AFAIK the only possible method... + bool IsAttribute() const { return Mode() & S_ATTR; } + bool IsRegularNode() const { return (Mode() & (S_ATTR_DIR | S_INDEX_DIR | S_ATTR)) == 0; } + // a regular node in the standard namespace (i.e. not an index or attribute) bool IsSymLink() const { return S_ISLNK(Mode()); } bool HasUserAccessableStream() const { return S_ISREG(Mode()); } // currently only files can be accessed with bfs_read()/bfs_write()