#include <yateclass.h>
Inheritance diagram for File:
Public Member Functions | |
File () | |
File (HANDLE handle) | |
virtual | ~File () |
virtual bool | openPath (const char *name, bool canWrite=false, bool canRead=true, bool create=false, bool append=false, bool binary=false) |
virtual bool | terminate () |
void | attach (HANDLE handle) |
HANDLE | detach () |
HANDLE | handle () const |
virtual bool | canRetry () const |
virtual bool | valid () const |
virtual bool | setBlocking (bool block=true) |
virtual unsigned int | length () |
virtual int | writeData (const void *buffer, int length) |
virtual int | readData (void *buffer, int length) |
Static Public Member Functions | |
static HANDLE | invalidHandle () |
static bool | remove (const char *name) |
static bool | createPipe (File &reader, File &writer) |
Protected Member Functions | |
void | copyError () |
Protected Attributes | |
HANDLE | m_handle |
Class to encapsulate a system dependent file in a system independent abstraction
|
Default constructor, creates a closed file |
|
Constructor from an existing handle
|
|
Destructor, closes the file |
|
Attach an existing handle to the file, closes any existing first
|
|
Check if the last error code indicates a retryable condition
Reimplemented from Stream. |
|
Copy the last error code from the operating system |
|
Create a pair of unidirectionally pipe connected streams
|
|
Detaches the object from the file handle
|
|
Get the operating system handle to the file
|
|
Get the operating system specific handle value for an invalid file
|
|
Find the length of the file if it has one
|
|
Opens a file from the filesystem pathname
|
|
Read data from an open file
Implements Stream. |
|
Deletes a file entry from the filesystem
|
|
Set the blocking or non-blocking operation mode of the file
Reimplemented from Stream. |
|
Closes the file handle
Implements Stream. |
|
Check if this file is valid
Implements Stream. |
|
Write data to an open file
Implements Stream. |