Added some more type identifying methods and constants (i.e. Inode::IsAttribute()).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1984 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
68e8d1f65e
commit
8ea2f57ddd
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user