2 * Copyright 2002-2011 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
20 node_ref(dev_t device
, ino_t node
);
21 node_ref(const node_ref
& other
);
23 bool operator==(const node_ref
& other
) const;
24 bool operator!=(const node_ref
& other
) const;
25 bool operator<(const node_ref
& other
) const;
26 node_ref
& operator=(const node_ref
& other
);
33 class BNode
: public BStatable
{
36 BNode(const entry_ref
* ref
);
37 BNode(const BEntry
* entry
);
38 BNode(const char* path
);
39 BNode(const BDirectory
* dir
, const char* path
);
40 BNode(const BNode
& node
);
43 status_t
InitCheck() const;
45 virtual status_t
GetStat(struct stat
* st
) const;
47 status_t
SetTo(const entry_ref
* ref
);
48 status_t
SetTo(const BEntry
* entry
);
49 status_t
SetTo(const char* path
);
50 status_t
SetTo(const BDirectory
* dir
, const char* path
);
58 ssize_t
WriteAttr(const char* name
, type_code type
,
59 off_t offset
, const void* buffer
,
61 ssize_t
ReadAttr(const char* name
, type_code type
,
62 off_t offset
, void* buffer
,
64 status_t
RemoveAttr(const char* name
);
65 status_t
RenameAttr(const char* oldName
,
67 status_t
GetAttrInfo(const char* name
,
68 struct attr_info
* info
) const;
69 status_t
GetNextAttrName(char* buffer
);
70 status_t
RewindAttrs();
71 status_t
WriteAttrString(const char* name
,
73 status_t
ReadAttrString(const char* name
,
74 BString
* result
) const;
76 BNode
& operator=(const BNode
& node
);
77 bool operator==(const BNode
& node
) const;
78 bool operator!=(const BNode
& node
) const;
81 // This should be "const" but R5's is not... Ugggh.
85 friend class BDirectory
;
86 friend class BSymLink
;
88 virtual void _RudeNode1();
89 virtual void _RudeNode2();
90 virtual void _RudeNode3();
91 virtual void _RudeNode4();
92 virtual void _RudeNode5();
93 virtual void _RudeNode6();
96 status_t
set_fd(int fd
);
97 virtual void close_fd();
98 void set_status(status_t newStatus
);
100 status_t
_SetTo(int fd
, const char* path
, bool traverse
);
101 status_t
_SetTo(const entry_ref
* ref
, bool traverse
);
103 virtual status_t
set_stat(struct stat
& stat
, uint32 what
);
105 status_t
_GetStat(struct stat
* stat
) const;
106 virtual status_t
_GetStat(struct stat_beos
* stat
) const;
107 status_t
InitAttrDir();
112 // Ffile descriptor for the given node
114 // file descriptor for the attribute directory of the node,
115 // initialized lazily
117 // the node's initialization status