#include <textfile.h>
Inheritance diagram for PTextFile:
Public Member Functions | |
Construction | |
PTextFile () | |
PTextFile (OpenMode mode, int opts=ModeDefault) | |
PTextFile (const PFilePath &name, OpenMode mode=ReadWrite, int opts=ModeDefault) | |
Line I/O functions | |
BOOL | ReadLine (PString &str) |
BOOL | WriteLine (const PString &str) |
|
Create a text file object but do not open it. It does not initially have a valid file name. However, an attempt to open the file using the PFile::Open()# function will generate a unique temporary file. |
|
Create a unique temporary file name, and open the file in the specified mode and using the specified options. Note that opening a new, unique, temporary file name in ReadOnly mode will always fail. This would only be usefull in a mode and options that will create the file. The PChannel::IsOpen()# function may be used after object construction to determine if the file was successfully opened.
|
|
Create a text file object with the specified name and open it in the specified mode and with the specified options. The PChannel::IsOpen()# function may be used after object construction to determine if the file was successfully opened.
|
|
Read a line from the text file. What constitutes an end of line in the file is platform dependent. Use the #PChannel::GetLastError()# function to determine if there was some error other than end of file.
|
|
Read a line from the text file. What constitutes an end of line in the file is platform dependent. Use the #PChannel::GetLastError()# function to determine the failure mode.
|