85 bool exclusive =
false);
93 void*
getData() const noexcept {
return address; }
98 size_t getSize() const noexcept {
return (
size_t) range.getLength(); }
105 void* address =
nullptr;
109 void* fileHandle =
nullptr;
114 void openInternal (
const File&, AccessMode,
bool);
Represents a local file or directory.
Maps a file into virtual memory for easy reading and/or writing.
Range< int64 > getRange() const noexcept
Returns the section of the file at which the mapped memory represents.
~MemoryMappedFile()
Destructor.
void * getData() const noexcept
Returns the address at which this file has been mapped, or a null pointer if the file couldn't be suc...
size_t getSize() const noexcept
Returns the number of bytes of data that are available for reading or writing.
AccessMode
The read/write flags used when opening a memory mapped file.
@ readOnly
Indicates that the memory can only be read.
A general-purpose range object, that simply represents any linear range with a start and end point.
#define JUCE_API
This macro is added to all JUCE public class declarations.