SkyGI::FileReference Class Reference

Inheritance diagram for SkyGI::FileReference:
[legend]
Collaboration diagram for SkyGI::FileReference:
[legend]
List of all members.

Public Member Functions

 FileReference (const String &cDirectory, const String &cFileName)
 FileReference (const String &pPath)
 FileReference ()
 FileReference (const FileReference &pFileReference)
 FileReference (const String &szRoot, const String &szFileName, ino_t ino)
 FileReference (const String &szRoot, ino_t ino)
 FileReference (dev_t nDevice, ino_t ino)
 ~FileReference ()
void SetTo (const String &cPath)
void ConstructPath (const char *pFirstPart,...)
String GetPath () const
ImageGetFileIcon (int iSize=16) const
String GetFileIconPath (int iSize=16) const
int Stat (struct stat *st) const
bool IsDirectory () const
bool IsRegular () const
bool IsLink () const
virtual bool IsValid () const
bool IsQuery () const
bool IsDesktopLink () const
String GetFileType () const
String GetLast () const
String CutLast () const
MonitorID Monitor (Window *pTarget, unsigned int uiMonitorFlags) const
void StopMonitor () const
FileReferenceoperator= (const FileReference &pFileReference)
bool operator== (const FileReference &pFileReference) const
bool operator== (const String &szPath) const
String GetExtension () const
String GetFileName () const
void Normalize ()
off_t GetSize () const
time_t GetAccessTime () const
time_t GetCreateTime () const
time_t GetModifyTime () const
bool GetNextAttributeEntry (FileAttributeInfo &pAttributeInfo)
FileAttributeReadAttribute (const String &szAttributeName, AttributeType nAttributeType, off_t nPos, int iLength) const
size_t ReadAttribute (const String &szAttributeName, AttributeType nAttributeType, void *vpBuffer, off_t nPos, int iLength)
size_t WriteAttribute (const String &szAttributeName, AttributeType nAttributeType, const void *pBuffer, off_t nPos, int iLength)
bool RemoveAttribute (const String &szAttributeName)
void RewindAttribute ()
String GetMimeType () const
bool SetMimeType (const String &szMimeType)
bool ReadMimeTypeAttribute (String &szMimeType) const
bool Identify (bool bForce=false, bool bWait=false)

Static Public Member Functions

static String Normalize (const String &szPath)

Classes

class  Private

Detailed Description

FileReference

Description:
A filereference is a logical reference to a filesystem node. Use this class to get node stats, file icons or monitor file changes.


Constructor & Destructor Documentation

FileReference::FileReference ( const String cDirectory,
const String cFileName 
)

FileReference::FileReference ( const String pPath  ) 

FileReference::FileReference (  ) 

FileReference::FileReference ( const FileReference pFileReference  ) 

FileReference::FileReference ( const String szRoot,
const String szFileName,
ino_t  ino 
)

FileReference::FileReference ( const String szRoot,
ino_t  ino 
)

FileReference::FileReference ( dev_t  nDevice,
ino_t  ino 
)

FileReference::~FileReference (  ) 


Member Function Documentation

void FileReference::SetTo ( const String cPath  ) 

void FileReference::ConstructPath ( const char *  pFirstPart,
  ... 
)

String FileReference::GetPath (  )  const

Get the path

Description:
'/boot/home/foo.txt'. Will return '/boot/home/foo.txt'
See also:
GetFileName, GetExtension, GetLast

Image * FileReference::GetFileIcon ( int  iSize = 16  )  const

String FileReference::GetFileIconPath ( int  iSize = 16  )  const

int FileReference::Stat ( struct stat *  st  )  const

bool FileReference::IsDirectory (  )  const

bool FileReference::IsRegular (  )  const

bool FileReference::IsLink (  )  const

bool FileReference::IsValid (  )  const [virtual]

bool FileReference::IsQuery (  )  const

bool FileReference::IsDesktopLink (  )  const

String FileReference::GetFileType (  )  const

String FileReference::GetLast (  )  const

Get the last segment of the file

Description:
'/boot/home/foo.txt'. Will return 'foo.txt'
See also:
GetFileName, GetExtension, GetPath, CutLast

String FileReference::CutLast (  )  const

Get all but last segment of the file

Description:
'/boot/home/foo.txt'. Will return '/boot/home'
See also:
GetFileName, GetExtension, GetPath, GetLast

MonitorID FileReference::Monitor ( Window pTarget,
unsigned int  uiMonitorFlags 
) const

Monitor node changes

Description:
Monitors the node for specified changes. The windows OnMonitor virtual member functions gets called whenever a specified event occured on the node.
See also:
StopMonitor

void FileReference::StopMonitor (  )  const

FileReference & FileReference::operator= ( const FileReference pFileReference  ) 

bool FileReference::operator== ( const FileReference pFileReference  )  const

bool FileReference::operator== ( const String szPath  )  const

String FileReference::GetExtension (  )  const

Get the extension of the file

Description:
'/boot/home/foo.txt'. Will return 'txt'
See also:
GetFileName, GetPath, GetLast, CutLast

String FileReference::GetFileName (  )  const

Get the name of the file

Description:
'/boot/home/foo.txt'. Will return 'foo'
See also:
GetPath, GetExtension, GetLast, CutLast

void FileReference::Normalize (  ) 

String FileReference::Normalize ( const String szPath  )  [static]

off_t FileReference::GetSize (  )  const

Reimplemented in SkyGI::File.

time_t FileReference::GetAccessTime (  )  const

time_t FileReference::GetCreateTime (  )  const

time_t FileReference::GetModifyTime (  )  const

bool FileReference::GetNextAttributeEntry ( FileAttributeInfo pAttributeInfo  ) 

FileAttribute * FileReference::ReadAttribute ( const String szAttributeName,
AttributeType  nAttributeType,
off_t  nPos,
int  iLength 
) const

size_t FileReference::ReadAttribute ( const String szAttributeName,
AttributeType  nAttributeType,
void *  vpBuffer,
off_t  nPos,
int  iLength 
)

size_t FileReference::WriteAttribute ( const String szAttributeName,
AttributeType  nAttributeType,
const void *  pBuffer,
off_t  nPos,
int  iLength 
)

bool FileReference::RemoveAttribute ( const String szAttributeName  ) 

void FileReference::RewindAttribute (  ) 

String FileReference::GetMimeType (  )  const

Get mimetype of file

Description:
Tries to get the MimeType. This is done in following order: 1. Check if registrar knows about this file type by its extensions 2. Check if registrar knows about this file by its mimetype attribute (if there is any)
See also:
Mime::GetByPath, Identify

bool FileReference::SetMimeType ( const String szMimeType  ) 

bool FileReference::ReadMimeTypeAttribute ( String szMimeType  )  const

Read the MimeType attribute value

Description:
If the file has a mimetype attribute the content gets returned in szMimeType and the function returns true.

bool FileReference::Identify ( bool  bForce = false,
bool  bWait = false 
)


Generated on Thu Dec 13 18:14:04 2007 for SkyGI by  doxygen 1.5.1-p1