HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FS_FileSystem Class Reference

#include <FS_FileSystem.h>

Public Member Functions

 FS_FileSystem (const char *start_path="")
 
 ~FS_FileSystem ()
 
int changePath (const char *newpath)
 
const char * getPath (char *buffer=0, int len=0)
 
void setPattern (const char *p)
 
int canCreateDir (const char *path)
 
int createDir (const char *path)
 
int canViewFile () const
 
void viewFile (const char *path)
 
int pollDirectory ()
 
void forceReload ()
 
int statFile (const char *name, FS_Stat *stats=0)
 
int accessFile (const char *name, int access_mode)
 
void setFileFilter (FS_FileFilter filter, void *data)
 
void setDirectoryFilter (FS_FileFilter filter, void *data)
 
UT_StringArraygetDirectories ()
 
UT_StringArraygetFiles ()
 
UT_Array< FS_Stat > & getFileStats ()
 
UT_Array< FS_Stat > & getDirStats ()
 
void setHidden (bool hidden)
 
int isRoot (const char *otherpath=0)
 

Protected Member Functions

time_t statDirectory ()
 
int readContents ()
 
void addDirectory (const char *name, const FS_Stat &fstat)
 
void addFilename (const char *name, const FS_Stat &fstat)
 

Protected Attributes

UT_String myPath
 
UT_String myLastReadPath
 
bool myIgnoreHidden
 
FS_FileFilter myFilter
 
voidmyFilterData
 
FS_FileFilter myDirFilter
 
voidmyDirFilterData
 

Detailed Description

Definition at line 30 of file FS_FileSystem.h.

Constructor & Destructor Documentation

FS_FileSystem::FS_FileSystem ( const char *  start_path = "")
FS_FileSystem::~FS_FileSystem ( )

Member Function Documentation

int FS_FileSystem::accessFile ( const char *  name,
int  access_mode 
)
void FS_FileSystem::addDirectory ( const char *  name,
const FS_Stat fstat 
)
protected

It would be nice to sort these as we read them in but then the fileStats will not match up. Therefore, we append entries now and sort them later.

void FS_FileSystem::addFilename ( const char *  name,
const FS_Stat fstat 
)
protected
int FS_FileSystem::canCreateDir ( const char *  path)
int FS_FileSystem::canViewFile ( ) const
int FS_FileSystem::changePath ( const char *  newpath)
int FS_FileSystem::createDir ( const char *  path)
void FS_FileSystem::forceReload ( )
inline

Definition at line 55 of file FS_FileSystem.h.

UT_StringArray& FS_FileSystem::getDirectories ( )
inline

Definition at line 70 of file FS_FileSystem.h.

UT_Array<FS_Stat>& FS_FileSystem::getDirStats ( )
inline

Definition at line 76 of file FS_FileSystem.h.

UT_StringArray& FS_FileSystem::getFiles ( )
inline

Definition at line 72 of file FS_FileSystem.h.

UT_Array<FS_Stat>& FS_FileSystem::getFileStats ( )
inline

Definition at line 75 of file FS_FileSystem.h.

const char* FS_FileSystem::getPath ( char *  buffer = 0,
int  len = 0 
)
int FS_FileSystem::isRoot ( const char *  otherpath = 0)
int FS_FileSystem::pollDirectory ( )
int FS_FileSystem::readContents ( )
protected
void FS_FileSystem::setDirectoryFilter ( FS_FileFilter  filter,
void data 
)
void FS_FileSystem::setFileFilter ( FS_FileFilter  filter,
void data 
)
void FS_FileSystem::setHidden ( bool  hidden)
inline

Definition at line 78 of file FS_FileSystem.h.

void FS_FileSystem::setPattern ( const char *  p)
inline

Definition at line 43 of file FS_FileSystem.h.

time_t FS_FileSystem::statDirectory ( )
protected
int FS_FileSystem::statFile ( const char *  name,
FS_Stat stats = 0 
)
void FS_FileSystem::viewFile ( const char *  path)

Member Data Documentation

FS_FileFilter FS_FileSystem::myDirFilter
protected

Definition at line 107 of file FS_FileSystem.h.

void* FS_FileSystem::myDirFilterData
protected

Definition at line 108 of file FS_FileSystem.h.

FS_FileFilter FS_FileSystem::myFilter
protected

Definition at line 104 of file FS_FileSystem.h.

void* FS_FileSystem::myFilterData
protected

Definition at line 105 of file FS_FileSystem.h.

bool FS_FileSystem::myIgnoreHidden
protected

Definition at line 102 of file FS_FileSystem.h.

UT_String FS_FileSystem::myLastReadPath
protected

Definition at line 100 of file FS_FileSystem.h.

UT_String FS_FileSystem::myPath
protected

Definition at line 100 of file FS_FileSystem.h.


The documentation for this class was generated from the following file: