Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

os::FileReference Class Reference

Semi persistent reference to a file. More...

#include <filereference.h>

List of all members.

Public Methods

 FileReference ()
 FileReference (const std::string &cPath, bool bFollowLinks=false)
 FileReference (const Directory &cDir, const std::string &cName, bool bFollowLinks=false)
 FileReference (const FileReference &cRef)
virtual ~FileReference ()
status_t SetTo (const std::string &cPath, bool bFollowLinks=false)
status_t SetTo (const Directory &cDir, const std::string &cName, bool bFollowLinks=false)
status_t SetTo (const FileReference &cRef)
void Unset ()
bool IsValid () const
std::string GetName () const
status_t GetPath (std::string *pcPath) const
int Rename (const std::string &cNewName)
status_t Delete ()
status_t GetStat (struct::stat *psStat) const
const DirectoryGetDirectory () const


Detailed Description

Description:
FileReference's serve much the same functionality as a plain path. It uniquely identifies a file within the filesystem. The main advantage of a FileReference is that it can partly "track" the file it reference. While moving a file to another directory or renaming the directory it lives in or any of it's subdirectories whould break a path, it will not affect a FileReference. Renaming the file itself however from outside the FileReference (ie. not using the FileReference::Rename() member) will break a FileReference aswell.

See also:
Author:
Kurt Skauen (kurt@atheos.cx)


Constructor & Destructor Documentation

FileReference::FileReference
 

FileReference::FileReference const std::string & a_cPath,
bool bFollowLinks = false
 

FileReference::FileReference const Directory & cDir,
const std::string & cName,
bool bFollowLinks = false
 

FileReference::FileReference const FileReference & cRef
 

FileReference::~FileReference [virtual]
 


Member Function Documentation

status_t FileReference::Delete
 

const Directory & FileReference::GetDirectory const
 

std::string FileReference::GetName const
 

status_t FileReference::GetPath std::string * pcPath const
 

status_t FileReference::GetStat struct::stat * psStat const
 

bool FileReference::IsValid const
 

status_t FileReference::Rename const std::string & cNewName
 

status_t FileReference::SetTo const FileReference & cRef
 

int FileReference::SetTo const Directory & cDir,
const std::string & cName,
bool bFollowLinks = false
 

int FileReference::SetTo const std::string & a_cPath,
bool bFollowLinks = false
 

void FileReference::Unset
 


Generated at Tue Sep 11 15:27:47 2001 for AtheOS higlevel API by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001