Logo Search packages:      
Sourcecode: pwlib version File versions

BOOL PFile::Close (  )  [virtual, inherited]

Close the file channel.

Returns:
TRUE if close was OK.

Reimplemented from PChannel.

Reimplemented in PWAVFile.

Definition at line 1013 of file pchannel.cxx.

Referenced by PWAVFile::Close(), PFile::Open(), PFile::Remove(), and PFTPServer::SendToClient().

{
  if (!IsOpen())
    return SetErrorValues(NotOpen, EBADF);

  flush();

#ifdef WOT_NO_FILESYSTEM
  BOOL ok = TRUE;
#else
  BOOL ok = ConvertOSError(_close(os_handle));
#endif

  os_handle = -1;

  if (removeOnClose)
    Remove();

  return ok;
}


Generated by  Doxygen 1.6.0   Back to index