30 #ifndef PTLIB_PMEMFILE_H
31 #define PTLIB_PMEMFILE_H
177 #endif // PTLIB_PMEMFILE_H
const PBYTEArray & GetData() const
Get the memory data the file has operated with.
Definition: memfile.h:165
This class represents a disk file.
Definition: file.h:57
virtual bool InternalOpen(OpenMode mode, OpenOptions opts, PFileInfo::Permissions permissions)
virtual PBoolean Write(const void *buf, PINDEX len)
Low level write to the memory file channel.
virtual off_t GetPosition() const
Get the current active position in the file for the next read or write operation. ...
~PMemoryFile()
Destroy the memory file.
This class is used to allow a block of memory to substitute for a disk file.
Definition: memfile.h:40
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:2251
virtual off_t GetLength() const
Get the current size of the file.
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:605
off_t m_position
Definition: memfile.h:173
Comparison Compare(const PObject &obj) const
Determine the relative rank of the two objects.
FilePositionOrigin
Options for the origin in setting the file position.
Definition: file.h:500
bool PBoolean
Definition: object.h:174
virtual PBoolean SetPosition(off_t pos, FilePositionOrigin origin=Start)
Set the current active position in the file for the next read or write operation. ...
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:172
Set position relative to start of file.
Definition: file.h:501
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
OpenMode
When a file is opened, it may restrict the access available to operations on the object instance...
Definition: file.h:74