os::FileReference Class Reference
[The Syllable high level filesystem API]

Semi persistent reference to a file. More...

List of all members.

Public Member Functions

 FileReference ()
 FileReference (const String &cPath, bool bFollowLinks=false)
 FileReference (const Directory &cDir, const String &cName, bool bFollowLinks=false)
 FileReference (const FileReference &cRef)
virtual ~FileReference ()
status_t SetTo (const String &cPath, bool bFollowLinks=false)
status_t SetTo (const Directory &cDir, const String &cName, bool bFollowLinks=false)
status_t SetTo (const FileReference &cRef)
void Unset ()
bool IsValid () const
String GetName () const
status_t GetPath (String *pcPath) const
int Rename (const String &cNewName)
status_t Delete ()
WindowRenameDialog (const Messenger &cMsgTarget, Message *pcChangeMsg)
 Create a dialog which can be used to rename a directory or file.
WindowInfoDialog (const Messenger &cMsgTarget, Message *pcChangeMsg)
 Create a dialog which shows information about a file or directory.
status_t GetStat (struct stat *psStat) const
const DirectoryGetDirectory () const

Classes

class  Private


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 ([email protected])


Constructor & Destructor Documentation

FileReference::FileReference (  ) 

FileReference::FileReference ( const String cPath,
bool  bFollowLinks = false 
)

FileReference::FileReference ( const Directory cDir,
const String cName,
bool  bFollowLinks = false 
)

FileReference::FileReference ( const FileReference cRef  ) 

FileReference::~FileReference (  )  [virtual]


Member Function Documentation

int FileReference::SetTo ( const String cPath,
bool  bFollowLinks = false 
)

int FileReference::SetTo ( const Directory cDir,
const String cName,
bool  bFollowLinks = false 
)

status_t FileReference::SetTo ( const FileReference cRef  ) 

void FileReference::Unset (  ) 

bool FileReference::IsValid (  )  const

String FileReference::GetName (  )  const

status_t FileReference::GetPath ( String pcPath  )  const

status_t FileReference::Rename ( const String cNewName  ) 

status_t FileReference::Delete (  ) 

Window * FileReference::RenameDialog ( const Messenger cMsgTarget,
Message pcMsg 
)

Description:
The created window contains an input field where the user can type the new name of the directory/file. A message will be sent to the supplied message target if the file/directory has been renamed.
Note:
Don’t forget to place the window at the right position and show it.
Parameters:
cMsgTarget - The target that will receive the message.
pcMsg - The message that will be sent.
Author:
Arno Klenke ([email protected])

Window * FileReference::InfoDialog ( const Messenger cMsgTarget,
Message pcChangeMsg 
)

Description:
This dialog will show information about a file like its name, size and type. It is also possible to change the file type. If any changes have been made, then a message will be sent to the supplied message target.
Note:
Don’t forget to place the window at the right position and show it.
Parameters:
cMsgTarget - The target that will receive the message.
pcMsg - The message that will be sent.
Author:
Arno Klenke ([email protected])

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

const Directory & FileReference::GetDirectory (  )  const


Generated on Sat May 9 22:51:56 2009 for Syllable higlevel API by  doxygen 1.5.1