Pure abstract class that provides a wrapper interface to the POSIX® stat() function.
More...
Inherited by BEntry, and BNode.
Pure abstract class that provides a wrapper interface to the POSIX® stat() function.
BStatable provides common functionality for the BEntry and BNode classes. You can use this class to:
- Since
- BeOS R3
◆ GetAccessTime()
status_t BStatable::GetAccessTime |
( |
time_t * |
atime | ) |
const |
◆ GetCreationTime()
status_t BStatable::GetCreationTime |
( |
time_t * |
ctime | ) |
const |
Fills out ctime with the creation time of the node.
- Parameters
-
ctime | A pointer to a time_t variable to be set. |
- See also
- SetCreationTime()
-
GetStat() for return codes.
- Since
- BeOS R3
◆ GetGroup()
status_t BStatable::GetGroup |
( |
gid_t * |
group | ) |
const |
Fills out the node's GID into group.
- Parameters
-
group | a pointer to a gid_t variable to be set. |
- See also
- SetGroup()
-
GetStat() for return codes.
- Since
- BeOS R3
◆ GetModificationTime()
status_t BStatable::GetModificationTime |
( |
time_t * |
mtime | ) |
const |
Fills out mtime with the last modification time of the node.
- Parameters
-
mtime | A pointer to a time_t variable to be set. |
- See also
- SetModificationTime()
-
GetStat() for return codes.
- Since
- BeOS R3
◆ GetNodeRef()
Fills out ref with the node_ref
of the node.
- Parameters
-
- See also
- GetStat() for return codes.
- Since
- BeOS R3
◆ GetOwner()
status_t BStatable::GetOwner |
( |
uid_t * |
owner | ) |
const |
Fills out the node's UID into owner.
- Parameters
-
owner | A pointer to a uid_t to be set. |
- See also
- SetOwner()
-
GetStat() for return codes.
- Since
- BeOS R3
◆ GetPermissions()
status_t BStatable::GetPermissions |
( |
mode_t * |
permissions | ) |
const |
Fills out perms with the permissions of the node.
- Parameters
-
permissions | The permissions to get from the node. |
- See also
- SetPermissions()
-
GetStat() for return codes.
- Since
- BeOS R3
◆ GetSize()
status_t BStatable::GetSize |
( |
off_t * |
size | ) |
const |
Fills out the size of the node's data (not counting attributes) into size.
- Parameters
-
size | A pointer to a off_t variable to be set. |
- See also
- GetStat() for return codes.
- Since
- BeOS R3
◆ GetStat()
status_t BStatable::GetStat |
( |
struct stat * |
stat | ) |
const |
|
pure virtual |
Fills out the stat structure for the node.
This method may be used to access the stat structure of a node directly.
- Parameters
-
stat | The stat structure to be filled in. |
- Returns
- A status code.
- Return values
-
B_OK | Everything went fine. |
B_NO_MEMORY | Could not allocate enough memory. |
B_BAD_VALUE | The node does not exist. |
B_NOT_ALLOWED | Node or volume was read only. |
- Since
- BeOS R3
Implemented in BNode, and BEntry.
◆ GetVolume()
Fills out vol with the the volume that the node lives on.
- Parameters
-
volume | A pointer to a BVolume object to be set. |
- See also
- BVolume
-
GetStat() for return codes.
- Since
- Haiku R1
◆ IsDirectory()
bool BStatable::IsDirectory |
( |
| ) |
const |
Returns whether or not the node is a directory.
- Returns
true
, if the node is properly initialized and is a directory, false
otherwise.
- Since
- BeOS R5
◆ IsFile()
bool BStatable::IsFile |
( |
| ) |
const |
Returns whether or not the node is a file.
- Returns
true
, if the node is properly initialized and is a file, false
otherwise.
- Since
- BeOS R5
◆ IsSymLink()
bool BStatable::IsSymLink |
( |
| ) |
const |
Returns whether or not the node is a symbolic link.
- Returns
true
, if the node is properly initialized and is a symlink, false
otherwise.
- Since
- BeOS R5
◆ SetAccessTime()
status_t BStatable::SetAccessTime |
( |
time_t |
atime | ) |
|
◆ SetCreationTime()
status_t BStatable::SetCreationTime |
( |
time_t |
ctime | ) |
|
Sets the node's creation time to ctime.
- Parameters
-
ctime | The creation time to set the node to. |
- See also
- GetStat() for return codes.
- Since
- BeOS R3
◆ SetGroup()
status_t BStatable::SetGroup |
( |
gid_t |
group | ) |
|
Sets the node's GID to group.
- Parameters
-
group | The GID to set the node to. |
- See also
- GetStat() for return codes.
- Since
- BeOS R3
◆ SetModificationTime()
status_t BStatable::SetModificationTime |
( |
time_t |
mtime | ) |
|
Sets the node's last modification time to mtime.
- Parameters
-
mtime | The modification time to set the node to. |
- See also
- GetStat() for return codes.
- Since
- BeOS R3
◆ SetOwner()
status_t BStatable::SetOwner |
( |
uid_t |
owner | ) |
|
Sets the node's UID to owner.
- Parameters
-
owner | The UID to set the node to. |
- See also
- GetStat() for return codes.
- Since
- BeOS R3
◆ SetPermissions()
status_t BStatable::SetPermissions |
( |
mode_t |
permissions | ) |
|
Sets the node's permissions to perms.
- Parameters
-
permissions | The permissions to set the node to. |
- See also
- GetStat() for return codes.
- Since
- BeOS R3