34 #ifndef PTLIB_PMEMFILE_H 35 #define PTLIB_PMEMFILE_H 211 #endif // PTLIB_PMEMFILE_H Comparison Compare(const PObject &obj) const
Determine the relative rank of the two objects.
This class represents a disk file.
Definition: file.h:60
virtual PBoolean Write(const void *buf, PINDEX len)
Low level write to the memory file channel.
~PMemoryFile()
Destroy the memory file.
This class is used to allow a block of memory to substitute for a disk file.
Definition: memfile.h:44
This class describes a full description for a file on the particular platform.
Definition: filepath.h:65
File can be both read and written.
Definition: file.h:80
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:1184
const PBYTEArray & GetData() const
Get the memory data the file has operated with.
Definition: memfile.h:201
virtual off_t GetPosition() const
Get the current active position in the file for the next read or write operation. ...
BOOL PBoolean
Definition: object.h:102
virtual PBoolean SetLength(off_t len)
Set the size of the file, padding with 0 bytes if it would require expanding the file, or truncating it if being made shorter.
virtual PBoolean Read(void *buf, PINDEX len)
Low level read from the memory file channel.
Array of unsigned characters.
Definition: array.h:670
off_t m_position
Definition: memfile.h:207
FilePositionOrigin
Options for the origin in setting the file position.
Definition: file.h:457
virtual off_t GetLength() const
Get the current size of the file.
virtual PBoolean SetPosition(off_t pos, FilePositionOrigin origin=Start)
Set the current active position in the file for the next read or write operation. ...
File options depend on the OpenMode parameter.
Definition: file.h:95
PMemoryFile()
Create a new, empty, memory file.
virtual PBoolean Close()
Close the channel, shutting down the link to the data source.
PBYTEArray m_data
Definition: memfile.h:206
Set position relative to start of file.
Definition: file.h:459
virtual PBoolean Open(OpenMode mode=ReadWrite, int opts=ModeDefault)
Open the current file in the specified mode and with the specified options.
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
OpenMode
When a file is opened, it may restrict the access available to operations on the object instance...
Definition: file.h:77