Function CSPFile::Open()
Description:
Opens an existing file with a filename strFilename.
 |
Prototype:
bool Open(const CSPString& strFilename, unsigned long ulMode = FILE_READ | FILE_WRITE);
Arguments:
- const CSPString& strFilename [IN]
The filename of the existing file to open.
- unsigned long ulMode = FILE_READ | FILE_WRITE [IN]
Read or write mode. Accepts any combination of the values CSPFile::FILE_READ and CSPFile::FILE_WRITE.
Return value:
If successful, it returns true. Otherwise, it returns false.
Remarks:
You can assign the value CSPFile::FILE_WRITE to argument ulMode, if you want to open a file for writing only, CSPFile::FILE_READ for reading only, or both using the bitwise OR for both reading and writing.
Examples:
CSPFile f;
f.Open( "C:\\somedir\\test.txt", CSPFile::FILE_READ || CSPFile::FILE_WRITE );
See also:
member functions Create(), Close()
|
|