Inheritance diagram for os::SymLink:
Public Member Functions | |
SymLink () | |
SymLink (const String &cPath, int nOpenMode=O_RDONLY) | |
SymLink (const Directory &cDir, const String &cName, int nOpenMode=O_RDONLY) | |
SymLink (const FileReference &cRef, int nOpenMode=O_RDONLY) | |
SymLink (const FSNode &cNode) | |
SymLink (const SymLink &cNode) | |
virtual | ~SymLink () |
virtual status_t | SetTo (const String &cPath, int nOpenMode=O_RDONLY) |
Open a node using a path. | |
virtual status_t | SetTo (const Directory &cDir, const String &cPath, int nOpenMode=O_RDONLY) |
Open a node using a dir/path pair. | |
virtual status_t | SetTo (const FileReference &cRef, int nOpenMode=O_RDONLY) |
Open the node referred to by the given os::FileReference. | |
virtual status_t | SetTo (const FSNode &cNode) |
Copy another FSNode. | |
virtual status_t | SetTo (const SymLink &cLink) |
status_t | ReadLink (String *pcBuffer) |
String | ReadLink () |
status_t | ConstructPath (const Directory &cParent, Path *pcBuffer) |
status_t | ConstructPath (const String &cParent, Path *pcBuffer) |
SymLink::SymLink | ( | ) |
SymLink::SymLink | ( | const String & | cPath, | |
int | nOpenMode = O_RDONLY | |||
) |
SymLink::SymLink | ( | const FileReference & | cRef, | |
int | nOpenMode = O_RDONLY | |||
) |
SymLink::SymLink | ( | const FSNode & | cNode | ) |
SymLink::SymLink | ( | const SymLink & | cNode | ) |
SymLink::~SymLink | ( | ) | [virtual] |
status_t SymLink::SetTo | ( | const String & | cPath, | |
int | nOpenMode = O_RDONLY | |||
) | [virtual] |
The 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:
cPath
don't point at a directorycPath
points at a symlink
cPath | Path pointing at the node to open. | |
nOpenMode | Flags controlling how to open the node. |
Reimplemented from os::FSNode.
status_t SymLink::SetTo | ( | const Directory & | cDir, | |
const String & | cPath, | |||
int | nOpenMode = O_RDONLY | |||
) | [virtual] |
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 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 String& cPath, int nOpenMode )
cDir | A valid directory from which the cPath is relative to. | |
cPath | The file path relative to cDir . The path can eighter be absoulute (in which case cDir is ignored) or it can be relative to cDir . | |
nOpenMode | Flags controlling how to open the node. See SetTo( const String& cPath, int nOpenMode ) for a full description of the various flags. |
Reimplemented from os::FSNode.
status_t SymLink::SetTo | ( | const FileReference & | cRef, | |
int | nOpenMode = O_RDONLY | |||
) | [virtual] |
Reimplemented from os::FSNode.
status_t SymLink::SetTo | ( | const FSNode & | cNode | ) | [virtual] |
cNode
. cNode | The FSNode to copy. |
Reimplemented from os::FSNode.
status_t SymLink::SetTo | ( | const SymLink & | cLink | ) | [virtual] |
status_t SymLink::ReadLink | ( | String * | pcBuffer | ) |
String SymLink::ReadLink | ( | ) |