Macintosh version allows specification via FSSpec structure and vol/dir ID plus filenames as well as the traditional file path string.
|
file manipulation that can throw exceptions, oofE_MacOSErr or oofE_General |
| void | gotoParentDirectory () const |
| oofString | readTextFile () const |
| | Read contents of file in one hit as string.
|
| void | readBinary (oofSharedBLOB *) const |
| void | writeTextFile (oofString &theStr) const |
| void | deleteFile (bool ignoreMissingFiles=true) const |
| void | renameFile (const oofString &newName) |
| void | copyToDirectory (const oofDirectory &, bool overwriteDest=false) const |
| void | moveToDirectory (const oofDirectory &, bool overwriteDest=false) |
reflective methods |
| oofString | path () const |
| oofString | filename () const |
| oofDirectory | directory () const |
| bool | isDirectory () const |
| tm | created () const |
| | Get file creation date/time.
|
| tm | lastModified () const |
| | Get file last modification date/time.
|
| unsigned long | fileSize (bool wantPhysical=true) const |
| bool | dirIsParent (const oofDirectory &) const |
Public Types |
| enum | isDirT { eDir,
eFile,
eNotSet
} |
Public Member Functions |
| | oofFileRef (const oofString &, isDirT isDir=eNotSet) |
| | oofFileRef (const char *path=0, isDirT isDir=eNotSet) |
| | default ctor allows you to create oofFileRef then assign
|
| | oofFileRef (const oofDirectory &theDir, const oofString &name, isDirT isDir=eNotSet) |
| | oofFileRef (const FSSpec &, isDirT isDir=eNotSet) |
| | oofFileRef (short vRefNum, long dirID, const oofString &name, isDirT isDir=eNotSet) |
| | operator FSSpec & () |
| const FSSpec & | spec () const |
| const oofFileRef & | operator= (const FSSpec &) |
| bool | scanVolsUntilFound () |
| const oofFileRef & | operator= (const oofString &) |
| void | clear () |
| bool | isValid () const |
| oofFileRef | makeRefToContainedFile (const oofString &name) const |
| void | extract (std::ostream &) const |
| FILE * | fopen (const char *mode="rb") const |
| OSErr | readCInfo (CInfoPBRec &cibr) const |
| void | setFileType (OSType typeCode, OSType creatorCode=0) |
| void | flushVolume () const |