// open specified file (may fail, use IsOpened())
wxFFile(const wxChar *filename, const wxChar *mode = _T("r"));
// attach to (already opened) file
// open specified file (may fail, use IsOpened())
wxFFile(const wxChar *filename, const wxChar *mode = _T("r"));
// attach to (already opened) file
- void Attach(FILE *fp, const wxString& name = wxEmptyString)
- { Close(); m_fp = fp; m_name = name; }
+ void Attach(FILE *lfp, const wxString& name = wxEmptyString)
+ { Close(); m_fp = lfp; m_name = name; }
void Detach() { m_fp = NULL; }
FILE *fp() const { return m_fp; }
// read/write (unbuffered)
// read all data from the file into a string (useful for text files)
void Detach() { m_fp = NULL; }
FILE *fp() const { return m_fp; }
// read/write (unbuffered)
// read all data from the file into a string (useful for text files)
size_t Read(void *pBuf, size_t nCount);
// returns the number of bytes written
size_t Write(const void *pBuf, size_t nCount);
size_t Read(void *pBuf, size_t nCount);
// returns the number of bytes written
size_t Write(const void *pBuf, size_t nCount);
bool IsOpened() const { return m_fp != NULL; }
// is end of file reached?
bool Eof() const { return feof(m_fp) != 0; }
bool IsOpened() const { return m_fp != NULL; }
// is end of file reached?
bool Eof() const { return feof(m_fp) != 0; }
bool Error() const { return ferror(m_fp) != 0; }
// get the file name
const wxString& GetName() const { return m_name; }
// type such as disk or pipe
bool Error() const { return ferror(m_fp) != 0; }
// get the file name
const wxString& GetName() const { return m_name; }
// type such as disk or pipe