|
| BFile () |
| Creates an uninitialized BFile object. More...
|
|
| BFile (const BDirectory *dir, const char *path, uint32 openMode) |
| Creates a BFile and initializes it to the file referred to by the supplied path name relative to the specified BDirectory and according to the specified open mode. More...
|
|
| BFile (const BEntry *entry, uint32 openMode) |
| Creates a BFile and initializes it to the file referred to by the supplied BEntry and according to the specified open mode. More...
|
|
| BFile (const BFile &file) |
| Creates a copy of the supplied BFile. More...
|
|
| BFile (const char *path, uint32 openMode) |
| Creates a BFile and initializes it to the file referred to by the supplied path name and according to the specified open mode. More...
|
|
| BFile (const entry_ref *ref, uint32 openMode) |
| Creates a BFile and initializes it to the file referred to by the supplied entry_ref and according to the specified open mode. More...
|
|
virtual | ~BFile () |
| Destroys the BFile object and frees all allocated resources. More...
|
|
virtual status_t | GetSize (off_t *size) const |
| Gets the size of the file. More...
|
|
bool | IsReadable () const |
| Reports whether or not the file is readable. More...
|
|
bool | IsWritable () const |
| Reports whether or not the file is writable. More...
|
|
BFile & | operator= (const BFile &file) |
| Assigns another BFile to this BFile. More...
|
|
virtual off_t | Position () const |
| Gets the current read/write position within the file. More...
|
|
virtual ssize_t | Read (void *buffer, size_t size) |
| Reads a number of bytes from the file into a buffer. More...
|
|
virtual ssize_t | ReadAt (off_t location, void *buffer, size_t size) |
| Reads a number of bytes from a certain position within the file into a buffer. More...
|
|
virtual off_t | Seek (off_t offset, uint32 seekMode) |
| Seeks to another read/write position within the file. More...
|
|
virtual status_t | SetSize (off_t size) |
| Sets the size of the file. More...
|
|
status_t | SetTo (const BDirectory *dir, const char *path, uint32 openMode) |
| Re-initializes the BFile to the file referred to by the supplied path name relative to the specified BDirectory and according to the specified open mode. More...
|
|
status_t | SetTo (const BEntry *entry, uint32 openMode) |
| Re-initializes the BFile to the file referred to by the supplied BEntry and according to the specified open mode. More...
|
|
status_t | SetTo (const char *path, uint32 openMode) |
| Re-initializes the BFile to the file referred to by the supplied path name and according to the specified open mode. More...
|
|
status_t | SetTo (const entry_ref *ref, uint32 openMode) |
| Re-initializes the BFile to the file referred to by the supplied entry_ref and according to the specified open mode. More...
|
|
virtual ssize_t | Write (const void *buffer, size_t size) |
| Writes a number of bytes from a buffer into the file. More...
|
|
virtual ssize_t | WriteAt (off_t location, const void *buffer, size_t size) |
| Writes a number of bytes from a buffer at a certain position into the file. More...
|
|
| BNode () |
| Creates an uninitialized BNode object. More...
|
|
| BNode (const BDirectory *dir, const char *path) |
| Creates a BNode object and initializes it to the entry referred to by the specified path rooted in the specified directory. More...
|
|
| BNode (const BEntry *entry) |
| Creates a BNode object and initializes it to the specified filesystem entry. More...
|
|
| BNode (const BNode &node) |
| Creates a copy of the given BNode. More...
|
|
| BNode (const char *path) |
| Creates a BNode object and initializes it to the entry referred to by the specified path. More...
|
|
| BNode (const entry_ref *ref) |
| Creates a BNode object and initializes it to the specified entry_ref. More...
|
|
virtual | ~BNode () |
| Frees all resources associated with the BNode. More...
|
|
int | Dup () |
| Gets the POSIX file descriptor referred to by this node. More...
|
|
virtual status_t | GetStat (struct stat *st) const |
| Fills in the given stat structure with the stat() information for this object. More...
|
|
status_t | InitCheck () const |
| Checks whether the object has been properly initialized or not. More...
|
|
status_t | SetTo (const entry_ref *ref) |
| Initializes the object to the specified entry_ref. More...
|
|
status_t | SetTo (const BEntry *entry) |
| Initializes the object to the specified filesystem entry. More...
|
|
status_t | SetTo (const char *path) |
| Initializes the object to the specified path. More...
|
|
status_t | SetTo (const BDirectory *dir, const char *path) |
| Initializes the object to the entry referred by the specified path relative to the the specified directory. More...
|
|
void | Unset () |
| Returns the object to an uninitialized state. More...
|
|
status_t | Lock () |
| Attains an exclusive lock on the data referred to by this node so that it may not be modified by any other objects or methods. More...
|
|
status_t | Unlock () |
| Unlocks the date referred to by this node. More...
|
|
status_t | Sync () |
| Immediately performs any pending disk actions on the node. More...
|
|
ssize_t | WriteAttr (const char *name, type_code type, off_t offset, const void *buffer, size_t length) |
| Writes data from a buffer to an attribute. More...
|
|
ssize_t | ReadAttr (const char *name, type_code type, off_t offset, void *buffer, size_t length) const |
| Reads data from an attribute into buffer. More...
|
|
status_t | RemoveAttr (const char *name) |
| Deletes the attribute given by name. More...
|
|
status_t | RenameAttr (const char *oldName, const char *newName) |
| Moves the attribute given by oldName to newName. More...
|
|
status_t | GetAttrInfo (const char *name, struct attr_info *info) const |
| Fills in the pre-allocated attr_info struct pointed to by info with information about the attribute specified by name. More...
|
|
status_t | GetNextAttrName (char *buffer) |
| Copies the name of the attribute into buffer and then advances the pointer to the next attribute. More...
|
|
status_t | RewindAttrs () |
| Resets the object's attribute pointer to the first attribute in the list. More...
|
|
status_t | WriteAttrString (const char *name, const BString *data) |
| Writes the specified string to the specified attribute, clobbering any previous data. More...
|
|
status_t | ReadAttrString (const char *name, BString *result) const |
| Reads the data of the specified attribute into the pre-allocated result. More...
|
|
BNode & | operator= (const BNode &node) |
| Initializes the object as a copy of other. More...
|
|
bool | operator== (const BNode &node) const |
| Tests whether this and the supplied BNode object are equal. More...
|
|
bool | operator!= (const BNode &node) const |
| Tests whether this and the supplied BNode object are not equal. More...
|
|
status_t | GetAccessTime (time_t *atime) const |
| Fills out atime with the access time of the node. More...
|
|
status_t | GetCreationTime (time_t *ctime) const |
| Fills out ctime with the creation time of the node. More...
|
|
status_t | GetGroup (gid_t *group) const |
| Fills out the node's GID into group. More...
|
|
status_t | GetModificationTime (time_t *mtime) const |
| Fills out mtime with the last modification time of the node. More...
|
|
status_t | GetNodeRef (node_ref *ref) const |
| Fills out ref with the node_ref of the node. More...
|
|
status_t | GetOwner (uid_t *owner) const |
| Fills out the node's UID into owner. More...
|
|
status_t | GetPermissions (mode_t *permissions) const |
| Fills out perms with the permissions of the node. More...
|
|
status_t | GetSize (off_t *size) const |
| Fills out the size of the node's data (not counting attributes) into size. More...
|
|
status_t | GetVolume (BVolume *volume) const |
| Fills out vol with the the volume that the node lives on. More...
|
|
bool | IsDirectory () const |
| Returns whether or not the node is a directory. More...
|
|
bool | IsFile () const |
| Returns whether or not the node is a file. More...
|
|
bool | IsSymLink () const |
| Returns whether or not the node is a symbolic link. More...
|
|
status_t | SetAccessTime (time_t atime) |
| Sets the node's access time to atime. More...
|
|
status_t | SetCreationTime (time_t ctime) |
| Sets the node's creation time to ctime. More...
|
|
status_t | SetGroup (gid_t group) |
| Sets the node's GID to group. More...
|
|
status_t | SetModificationTime (time_t mtime) |
| Sets the node's last modification time to mtime. More...
|
|
status_t | SetOwner (uid_t owner) |
| Sets the node's UID to owner. More...
|
|
status_t | SetPermissions (mode_t permissions) |
| Sets the node's permissions to perms. More...
|
|
| BPositionIO () |
| This constructor does nothing. More...
|
|
virtual | ~BPositionIO () |
| This destructor does nothing. More...
|
|
status_t | ReadAtExactly (off_t position, void *buffer, size_t size, size_t *_bytesRead=NULL) |
| Reads an exact amount of data from the object at the specified position into a buffer. More...
|
|
status_t | WriteAtExactly (off_t position, const void *buffer, size_t size, size_t *_bytesWritten=NULL) |
| Writes an exact amount of data from a buffer to the object at the specified position. More...
|
|
| BDataIO () |
| This constructor does nothing. More...
|
|
virtual | ~BDataIO () |
| This destructor does nothing. More...
|
|
virtual status_t | Flush () |
| Writes pending data to underlying storage. More...
|
|
status_t | ReadExactly (void *buffer, size_t size, size_t *_bytesRead=NULL) |
| Reads an exact amount of data from the object into a buffer. More...
|
|
status_t | WriteExactly (const void *buffer, size_t size, size_t *_bytesWritten=NULL) |
| Writes an exact amount of data from a buffer to the object. More...
|
|
Provides the ability to read and write the data of a file.
The file is automatically opened when you initialize a BFile and is automatically closed when you re-initialize or destroy the object.
Symbolic links are automatically transversed by opening a BFile. The node that the BFile ends up opening will be the file or directory that the link points to, not the symbolic link file itself.
- Since
- BeOS R3