// 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.
// ----------------------------------------------------------------------------
// def ctor
wxFFile() { m_fp = NULL; }
// open specified file (may fail, use IsOpened())
// def ctor
wxFFile() { m_fp = NULL; }
// open specified file (may fail, use IsOpened())
// attach to (already opened) file
wxFFile(FILE *fp) { m_fp = fp; }
// open/close
// open a file (existing or not - the mode controls what happens)
// attach to (already opened) file
wxFFile(FILE *fp) { m_fp = fp; }
// open/close
// open a file (existing or not - the mode controls what happens)
// closes the opened file (this is a NOP if not opened)
bool Close();
// assign an existing file descriptor and get it back from wxFFile object
// closes the opened file (this is a NOP if not opened)
bool Close();
// assign an existing file descriptor and get it back from wxFFile object
{ Close(); m_fp = fp; m_name = name; }
void Detach() { m_fp = NULL; }
FILE *fp() const { return m_fp; }
{ Close(); m_fp = fp; m_name = name; }
void Detach() { m_fp = NULL; }
FILE *fp() const { return m_fp; }
// returns the number of bytes written
size_t Write(const void *pBuf, size_t nCount);
// returns true on success
// returns the number of bytes written
size_t Write(const void *pBuf, size_t nCount);
// returns true on success