Internally this class uses automatically a buffer mapped into computer's memory (see https://en.wikipedia.org/wiki/Memory-mapped_file).
Currently the Mode Append has no effect on this device.
The use of this method without any file associated will set the State::Fail to true.
Return the data mapped in the memory
Default constructor. You must use the method Open after the use of this constructor
Returns true if a file was successfuly opened, otherwise false.
Returns false as the File class represents a random access device.
Open the given filename with the specified mode.
To open a file, the device has to be first closed if a previous file was already opened.
Similar to the read() method but does not modify the position of the read indicator. Returns the number of characters read. No exception or error flag is triggered when an error occurs.
Gets from the device a sequence of characters of size n and store it in s. The State::Fail state flag is set if any issue happens during the reading operation. In case the number or characters read does not correspond to the number of characters to read n, the State::End state flag is also set.
Moves the internal pointer of the given offset in the given direction dir.
Return the size of the data mapped in the memory
Returns the position of the internal pointer.