// dtor which is _not_ virtual, so it shouldn't be used as a base class.
// ----------------------------------------------------------------------------
// dtor which is _not_ virtual, so it shouldn't be used as a base class.
// ----------------------------------------------------------------------------
// 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 = wxT(""))
- { 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);
// file pointer operations (return ofsInvalid on failure)
// move ptr ofs bytes related to start/current pos/end of file
// file pointer operations (return ofsInvalid on failure)
// move ptr ofs bytes related to start/current pos/end of file
// is file opened?
bool IsOpened() const { return m_fp != NULL; }
// is end of file reached?
bool Eof() const { return feof(m_fp) != 0; }
// is file opened?
bool IsOpened() const { return m_fp != NULL; }
// is end of file reached?
bool Eof() const { return feof(m_fp) != 0; }