#include <fsnode.h>
Inheritance diagram for os::FSNode:
Public Methods | |
FSNode () | |
Default contructor. More... | |
FSNode (const std::string &cPath, int nOpenMode=O_RDONLY) | |
Construct a FSNode from a file path. More... | |
FSNode (const Directory &cDir, const std::string &cName, int nOpenMode=O_RDONLY) | |
Construct a FSNode from directory and a name inside that directory. More... | |
FSNode (const FileReference &cRef, int nOpenMode=O_RDONLY) | |
Construct a FSNode from a file reference. More... | |
FSNode (const FSNode &cNode) | |
Copy contructor. More... | |
virtual | ~FSNode () |
Destructor. More... | |
virtual status_t | FDChanged (int nNewFD, const struct::stat &sStat) |
virtual status_t | SetTo (const std::string &cPath, int nOpenMode=O_RDONLY) |
Open a node using a path. More... | |
virtual status_t | SetTo (const Directory &cDir, const std::string &cPath, int nOpenMode=O_RDONLY) |
Open a node using a dir/path pair. More... | |
virtual status_t | SetTo (const FileReference &cRef, int nOpenMode=O_RDONLY) |
Open the node referred to by the given os::FileReference. More... | |
virtual status_t | SetTo (const FSNode &cNode) |
Copy another FSNode. More... | |
virtual void | Unset () |
Reset the FSNode. More... | |
virtual bool | IsValid () const |
Check if the node has been properly initialized. More... | |
virtual status_t | GetStat (struct::stat *psStat, bool bUpdateCache=true) const |
virtual ino_t | GetInode () const |
virtual dev_t | GetDev () const |
virtual int | GetMode (bool bUpdateCache=true) const |
virtual off_t | GetSize (bool bUpdateCache=true) const |
virtual time_t | GetCTime (bool bUpdateCache=true) const |
virtual time_t | GetMTime (bool bUpdateCache=true) const |
virtual time_t | GetATime (bool bUpdateCache=true) const |
virtual status_t | GetNextAttrName (std::string *pcName) |
Read the node's attribute directory. More... | |
virtual status_t | RewindAttrdir () |
Reset the attribute directory iterator. More... | |
virtual ssize_t | WriteAttr (const std::string &cAttrName, int nFlags, int nType, const void *pBuffer, off_t nPos, size_t nLen) |
Add/update an attribute. More... | |
virtual ssize_t | ReadAttr (const std::string &cAttrName, int nType, void *pBuffer, off_t nPos, size_t nLen) |
Read the data held by an attribute. More... | |
virtual status_t | RemoveAttr (const std::string &cName) |
Remove an attribute from an FS node. More... | |
virtual status_t | StatAttr (const std::string &cName, struct::attr_info *psBuffer) |
virtual int | GetFileDescriptor () const |
Friends | |
class | Directory |
The native AtheOS filesystem (AFS) support "attributes" wich is extra data-streams associated with filesystem nodes. An attribute can have a specific type like int, float, string, etc etc, or it can be a untyped stream of data. Attributes can be used to store information associated by the file but that don't belong to file content itself (for example the file's icon-image and mime-type).
|
Default contructor.
|
|
Construct a FSNode from a file path.
|
|
Construct a FSNode from directory and a name inside that directory.
|
|
Construct a FSNode from a file reference.
|
|
Copy contructor.
|
|
Destructor.
|
|
Reimplemented in os::Directory, and os::File. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Read the node's attribute directory.
|
|
Reimplemented in os::File. |
|
|
|
Check if the node has been properly initialized.
|
|
Read the data held by an attribute.
|
|
Remove an attribute from an FS node.
|
|
Reset the attribute directory iterator.
|
|
Copy another FSNode.
Reimplemented in os::SymLink. |
|
Open the node referred to by the given os::FileReference.
Reimplemented in os::SymLink. |
|
Open a node using a dir/path pair.
cDir will then be ignored) or it can be relative to cDir . This have much the same semantics as setting the current working directory to cDir and then open the node by calling SetTo( const std::string& cPath, int nOpenMode ) with the path. The main advantage with this function is that it is thread-safe. You don't get any races while temporarily changing the current working directory.
For a more detailed description look at: SetTo( const std::string& cPath, int nOpenMode )
Reimplemented in os::SymLink. |
|
Open a node using a path.
nOpenMode should be a compination of any of the O_* flags defined in <fcntl.h>. Their meaning is the same as when opening a file with the open() POSIX function except you can not create a file by setting the O_CREAT flag.
The following flags are accepted:
Reimplemented in os::SymLink. |
|
|
|
Reset the FSNode.
|
|
Add/update an attribute.
|
|
|