cmlabs::JFile Class Reference

#include <JFile.h>

Inheritance diagram for cmlabs::JFile:

Inheritance graph
[legend]
Collaboration diagram for cmlabs::JFile:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 JFile (const JString &filedirname)
 ~JFile (void)
Objectclone () const
bool createFile (bool asBinary)
bool createDir (bool recursive=false)
bool openFile (bool asBinary)
bool closeFile ()
bool deleteFile (bool force=false)
bool deleteDir (bool recursive=false)
bool move (const JString &newname)
bool lock ()
bool unlock ()
bool flush ()
bool truncate ()
bool gotoStart ()
bool gotoEnd ()
bool gotoPos (int pos)
bool isAtEOF ()
bool isInError ()
bool isValid ()
bool exists ()
bool isADir ()
bool isAFile ()
Collection getFilesInDir ()
char * readBinary (int &length)
JString readAscii (int &length)
JString readLine ()
bool writeBinary (char *str, int &length)
bool writeAscii (const JString &str)
bool writeLine (const JString &str)
int getSize ()
bool isFileReadable ()
bool isFileWritable ()
bool isFileExecutable ()
bool isFileBinary ()
JTime getLastAccessTime ()
JTime getLastModifyTime ()
JTime getCreationTime ()
JString getFileNameOnly ()
JString getDirNameOnly ()
JString getFullPathName ()
bool deleteFile (const JString &name)
bool deleteDir (const JString &name)
bool changeAttr (const JString &name, bool read, bool write)

Static Public Member Functions

static JString readAFileASCII (const JString &name)
static char * readAFileASCII (const JString &name, int &length)
static char * readAFileBinary (const JString &name, int &length)
static bool readAFileASCII (const JString &name, char *data, int &length)
static bool readAFileBinary (const JString &name, char *data, int &length)
static bool writeAFileASCII (const JString &name, const JString &text)
static bool writeAFileASCII (const JString &name, char *str, int length)
static bool writeAFileBinary (const JString &name, char *str, int length)
static bool appendToAFileASCII (const JString &name, const JString &text)
static bool appendToAFileASCII (const JString &name, char *str, int length)
static Collection getFilesInADir (const JString &name)
static bool deleteAFile (const JString &name)
static bool deleteADir (const JString &name, bool recursive)
static unsigned long getAFileSize (const JString &name)
static bool doesAFileExist (const JString &name)
static bool doesADirExist (const JString &name)
static bool moveADir (const JString &from, const JString &to)
static bool moveAFile (const JString &from, const JString &to)
static bool createADir (const JString &fname)
static bool createADir (const JString &fname, bool recursive)
static JString getPathFromFullName (const JString &fname)
static JString getFileNameFromFullName (const JString &fname)
static JString findDirWithFile (Collection &dirs, const JString &filename)
static JString findDirWithFileFullPath (Collection &dirs, const JString &filename)

Protected Member Functions

bool collectFileInfo ()

Protected Attributes

bool doesExist
bool isDirectory
bool isReadable
bool isWritable
bool isExecutable
int isBinary
int size
bool isEOF
JString name
JTime lastAccessTime
JTime lastModifyTime
JTime creationTime
FILE * fileptr


Detailed Description

Definition at line 70 of file JFile.h.


Constructor & Destructor Documentation

cmlabs::JFile::JFile ( const JString filedirname  ) 

Definition at line 386 of file JFile.cpp.

cmlabs::JFile::~JFile ( void   ) 

Definition at line 407 of file JFile.cpp.


Member Function Documentation

JString cmlabs::JFile::readAFileASCII ( const JString name  )  [static]

Definition at line 91 of file JFile.cpp.

char * cmlabs::JFile::readAFileASCII ( const JString name,
int &  length 
) [static]

Definition at line 101 of file JFile.cpp.

char * cmlabs::JFile::readAFileBinary ( const JString name,
int &  length 
) [static]

Definition at line 175 of file JFile.cpp.

bool cmlabs::JFile::readAFileASCII ( const JString name,
char *  data,
int &  length 
) [static]

Definition at line 139 of file JFile.cpp.

bool cmlabs::JFile::readAFileBinary ( const JString name,
char *  data,
int &  length 
) [static]

Definition at line 209 of file JFile.cpp.

bool cmlabs::JFile::writeAFileASCII ( const JString name,
const JString text 
) [static]

Definition at line 53 of file JFile.cpp.

bool cmlabs::JFile::writeAFileASCII ( const JString name,
char *  str,
int  length 
) [static]

Definition at line 57 of file JFile.cpp.

bool cmlabs::JFile::writeAFileBinary ( const JString name,
char *  str,
int  length 
) [static]

Definition at line 74 of file JFile.cpp.

bool cmlabs::JFile::appendToAFileASCII ( const JString name,
const JString text 
) [static]

Definition at line 31 of file JFile.cpp.

bool cmlabs::JFile::appendToAFileASCII ( const JString name,
char *  str,
int  length 
) [static]

Definition at line 35 of file JFile.cpp.

Collection cmlabs::JFile::getFilesInADir ( const JString name  )  [static]

Definition at line 245 of file JFile.cpp.

bool cmlabs::JFile::deleteAFile ( const JString name  )  [static]

Definition at line 250 of file JFile.cpp.

bool cmlabs::JFile::deleteADir ( const JString name,
bool  recursive 
) [static]

Definition at line 255 of file JFile.cpp.

unsigned long cmlabs::JFile::getAFileSize ( const JString name  )  [static]

Definition at line 261 of file JFile.cpp.

bool cmlabs::JFile::doesAFileExist ( const JString name  )  [static]

Definition at line 266 of file JFile.cpp.

bool cmlabs::JFile::doesADirExist ( const JString name  )  [static]

Definition at line 271 of file JFile.cpp.

bool cmlabs::JFile::moveADir ( const JString from,
const JString to 
) [static]

Definition at line 281 of file JFile.cpp.

bool cmlabs::JFile::moveAFile ( const JString from,
const JString to 
) [static]

Definition at line 276 of file JFile.cpp.

bool cmlabs::JFile::createADir ( const JString fname  )  [static]

Definition at line 287 of file JFile.cpp.

bool cmlabs::JFile::createADir ( const JString fname,
bool  recursive 
) [static]

Definition at line 314 of file JFile.cpp.

JString cmlabs::JFile::getPathFromFullName ( const JString fname  )  [static]

Definition at line 343 of file JFile.cpp.

JString cmlabs::JFile::getFileNameFromFullName ( const JString fname  )  [static]

Definition at line 355 of file JFile.cpp.

JString cmlabs::JFile::findDirWithFile ( Collection dirs,
const JString filename 
) [static]

Definition at line 364 of file JFile.cpp.

JString cmlabs::JFile::findDirWithFileFullPath ( Collection dirs,
const JString filename 
) [static]

Definition at line 372 of file JFile.cpp.

Object * cmlabs::JFile::clone (  )  const [virtual]

Implements cmlabs::Object.

Definition at line 412 of file JFile.cpp.

bool cmlabs::JFile::createFile ( bool  asBinary  ) 

Definition at line 417 of file JFile.cpp.

bool cmlabs::JFile::createDir ( bool  recursive = false  ) 

Definition at line 750 of file JFile.cpp.

bool cmlabs::JFile::openFile ( bool  asBinary  ) 

Definition at line 444 of file JFile.cpp.

bool cmlabs::JFile::closeFile (  ) 

Definition at line 471 of file JFile.cpp.

bool cmlabs::JFile::deleteFile ( bool  force = false  ) 

Definition at line 484 of file JFile.cpp.

bool cmlabs::JFile::deleteDir ( bool  recursive = false  ) 

Definition at line 488 of file JFile.cpp.

bool cmlabs::JFile::move ( const JString newname  ) 

Definition at line 922 of file JFile.cpp.

bool cmlabs::JFile::lock (  ) 

Definition at line 956 of file JFile.cpp.

bool cmlabs::JFile::unlock (  ) 

Definition at line 957 of file JFile.cpp.

bool cmlabs::JFile::flush (  ) 

Definition at line 958 of file JFile.cpp.

bool cmlabs::JFile::truncate (  ) 

Definition at line 756 of file JFile.cpp.

bool cmlabs::JFile::gotoStart (  ) 

Definition at line 765 of file JFile.cpp.

bool cmlabs::JFile::gotoEnd (  ) 

Definition at line 771 of file JFile.cpp.

bool cmlabs::JFile::gotoPos ( int  pos  ) 

Definition at line 777 of file JFile.cpp.

bool cmlabs::JFile::isAtEOF (  ) 

Definition at line 731 of file JFile.cpp.

bool cmlabs::JFile::isInError (  ) 

Definition at line 735 of file JFile.cpp.

bool cmlabs::JFile::isValid (  ) 

Definition at line 739 of file JFile.cpp.

bool cmlabs::JFile::exists (  ) 

Definition at line 743 of file JFile.cpp.

bool cmlabs::JFile::isADir (  ) 

Definition at line 700 of file JFile.cpp.

bool cmlabs::JFile::isAFile (  ) 

Definition at line 706 of file JFile.cpp.

Collection cmlabs::JFile::getFilesInDir (  ) 

Definition at line 653 of file JFile.cpp.

char * cmlabs::JFile::readBinary ( int &  length  ) 

Definition at line 962 of file JFile.cpp.

JString cmlabs::JFile::readAscii ( int &  length  ) 

Definition at line 963 of file JFile.cpp.

JString cmlabs::JFile::readLine (  ) 

Definition at line 712 of file JFile.cpp.

bool cmlabs::JFile::writeBinary ( char *  str,
int &  length 
)

Definition at line 966 of file JFile.cpp.

bool cmlabs::JFile::writeAscii ( const JString str  ) 

Definition at line 967 of file JFile.cpp.

bool cmlabs::JFile::writeLine ( const JString str  ) 

Definition at line 968 of file JFile.cpp.

int cmlabs::JFile::getSize (  ) 

Definition at line 538 of file JFile.cpp.

bool cmlabs::JFile::isFileReadable (  ) 

Definition at line 970 of file JFile.cpp.

bool cmlabs::JFile::isFileWritable (  ) 

Definition at line 971 of file JFile.cpp.

bool cmlabs::JFile::isFileExecutable (  ) 

Definition at line 972 of file JFile.cpp.

bool cmlabs::JFile::isFileBinary (  ) 

Definition at line 973 of file JFile.cpp.

JTime cmlabs::JFile::getLastAccessTime (  ) 

Definition at line 975 of file JFile.cpp.

JTime cmlabs::JFile::getLastModifyTime (  ) 

Definition at line 976 of file JFile.cpp.

JTime cmlabs::JFile::getCreationTime (  ) 

Definition at line 977 of file JFile.cpp.

JString cmlabs::JFile::getFileNameOnly (  ) 

Definition at line 783 of file JFile.cpp.

JString cmlabs::JFile::getDirNameOnly (  ) 

Definition at line 803 of file JFile.cpp.

JString cmlabs::JFile::getFullPathName (  ) 

Definition at line 822 of file JFile.cpp.

bool cmlabs::JFile::deleteFile ( const JString name  ) 

Definition at line 862 of file JFile.cpp.

bool cmlabs::JFile::deleteDir ( const JString name  ) 

Definition at line 876 of file JFile.cpp.

bool cmlabs::JFile::changeAttr ( const JString name,
bool  read,
bool  write 
)

Definition at line 891 of file JFile.cpp.

bool cmlabs::JFile::collectFileInfo (  )  [protected]

Definition at line 553 of file JFile.cpp.


Member Data Documentation

bool cmlabs::JFile::doesExist [protected]

Definition at line 169 of file JFile.h.

bool cmlabs::JFile::isDirectory [protected]

Definition at line 170 of file JFile.h.

bool cmlabs::JFile::isReadable [protected]

Definition at line 171 of file JFile.h.

bool cmlabs::JFile::isWritable [protected]

Definition at line 172 of file JFile.h.

bool cmlabs::JFile::isExecutable [protected]

Definition at line 173 of file JFile.h.

int cmlabs::JFile::isBinary [protected]

Definition at line 174 of file JFile.h.

int cmlabs::JFile::size [protected]

Definition at line 175 of file JFile.h.

bool cmlabs::JFile::isEOF [protected]

Definition at line 176 of file JFile.h.

Definition at line 178 of file JFile.h.

Definition at line 179 of file JFile.h.

Definition at line 180 of file JFile.h.

Definition at line 181 of file JFile.h.

FILE* cmlabs::JFile::fileptr [protected]

Definition at line 183 of file JFile.h.


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

Generated on Tue Jul 7 16:22:48 2009 for CoreLibrary by  doxygen 1.5.6