Inheritance diagram for CP_File_Imp:
Public Member Functions | |
CP_File_Imp () | |
CP_File_Imp (const CP_FileSystemSpec &inFileSpec) | |
virtual | ~CP_File_Imp () |
void | Create (FourCharCode inCreator, FourCharCode inType=kCP_Text_FileType) |
void | Open (SInt16 inPermissions=CP_E_FilePerm_ReadWrite) |
void | Close () |
SInt64 | Length () |
SInt64 | GetPosition () const |
SInt64 | SetPosition (UInt16 inMode, SInt64 inOffset) |
UInt32 | ReadData (void *inDataBuffer, UInt32 inDataSize, UInt16 inPositionMode=CP_E_FileSeek_FromCurrent, SInt64 inOffset=0) |
UInt32 | WriteData (const void *inDataBuffer, UInt32 inDataSize, UInt16 inPositionMode=CP_E_FileSeek_FromCurrent, SInt64 inOffset=0) |
bool | IsOpen () |
CP_File_Imp () | |
CP_File_Imp (const CP_FileSystemSpec &inFileSpec) | |
virtual | ~CP_File_Imp () |
void | Create (FourCharCode inCreator, FourCharCode inType=kCP_Text_FileType) |
void | Open (SInt32 inPermissions=CP_E_FilePerm_ReadWrite, bool inOpenResourceFork=true) |
SInt16 | OpenFork (SInt32 inPermissions, const HFSUniStr255 &inForkName) |
void | Close () |
CP_FileSystemSpec | GetFileSpec () |
OSFileRef | GetRefNumber () |
SInt64 | Length () |
SInt64 | GetPosition () const |
SInt64 | SetPosition (UInt16 inMode, SInt64 inOffset) |
void | SetEOF (SInt32 inEOF) |
UInt32 | ReadData (void *inDataBuffer, UInt32 inDataSize, UInt16 inPositionMode=CP_E_FileSeek_FromCurrent, SInt64 inOffset=0) |
UInt32 | WriteData (const void *inDataBuffer, UInt32 inDataSize, UInt16 inPositionMode=CP_E_FileSeek_FromCurrent, SInt64 inOffset=0) |
void | UseResFile () |
bool | IsOpen () |
void | FlushFork (SInt16 inRefNum) |
CP_FileSystemSpec | GetFileSpec () |
Constructor / Destructor | |
CP_File_Imp () | |
Constructor. | |
CP_File_Imp (const CP_FileSystemSpec &inFileSpec) | |
virtual | ~CP_File_Imp () |
Destructor. | |
Protected Member Functions | |
const HFSUniStr255 & | GetDataForkName () |
const HFSUniStr255 & | GetResourceForkName () |
Protected Attributes | |
CP_FileSystemSpec | fFileSpec |
OSFileRef | fRefNum |
OSFileRef | fDataForkRefNum |
OSFileRef | fResourceForkRefNum |
|
Constructor.
|
|
Constructor. This sets the CP_FileSystemSpec for this file.
|
|
Destructor. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Creates the platforms file object in the platforms file system. Throws an OSError if there is a problem creating the file.
|
|
Opens the file for reading and/or writing depending on the passed in inPermissions. Throws an OSError if there is a problem opening the data fork. Throws a std::logic_error if the file is already open.
|
|
Closes the file in the platforms file system.
|
|
Returns the length of our file. The file needs to currently be open, otherwide an error occurs.
|
|
Returns the current file marker position in the file.
|
|
Sets the current position in the file based on the passed in parameters.
|
|
Reads data fromm the file. Throws an OSError if there was a problem.
|
|
Writes data to the file. Throws an OSError if there was a problem.
|
|
|
|
|
|
Opens the file for reading and/or writing depending on the passed in inPermissions. Throws an OSError if there is a problem opening the data fork. Throws a std::logic_error if the file is already open. Note: If the file is being opened for write access, and the file doesn't currently exist, it will be created, and then opened to match the behavior of Windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns the MacOS name of the data fork. Throws an OSError if there is a problem getting the forks name.
|
|
Returns the MacOS name of the resource fork. Throws an OSError if there is a problem getting the forks name.
|
|
|
|
Opens the file for reading and/or writing depending on the passed in inPermissions. Throws an OSError if there is a problem opening the data fork. Throws a std::logic_error if the file is already open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CP_FileSystemSpec containing the name and location of this file. |
|
CP_FileSystemSpec containing the name and location of this file. |
|
MacOS file reference number for file when open, Data fork. |