Go to the documentation of this file.
29 #ifndef CASA_MMAPFDIO_H
30 #define CASA_MMAPFDIO_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/IO/FiledesIO.h>
35 #include <casacore/casa/OS/RegularFile.h>
void map(int fd, const String &fileName)
Map the given file descriptor entirely into memory with read access.
Int64 getFileSize() const
Get the file size.
void * getWritePointer(Int64 offset)
void unmapFile()
Unmap the file.
Class for unbuffered IO on a file.
virtual String fileName() const
Get the file name of the file attached.
MMapfdIO(const MMapfdIO &)
Forbid copy constructor and assignment.
const void * getReadPointer(Int64 offset) const
Get a read or write pointer to the given position in the mapped file.
MMapfdIO & operator=(const MMapfdIO &)
Memory-mapped IO on a file.
virtual void write(Int64 size, const void *buf)
Write the number of bytes from the seek position on.
void mapFile()
Map or remap the entire file.
this file contains all the compiler specific defines
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)
Reset the position pointer to the given value.
MMapfdIO(int fd, const String &fileName)
Map the given file descriptor entirely into memory with read access.
virtual Int64 read(Int64 size, void *buf, Bool throwException=True)
Read size bytes from the File.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
MMapfdIO()
Default constructor.
String: the storage and methods of handling collections of characters.
void flush()
Flush changed mapped data to the file.
bool Bool
Define the standard types used by Casacore.
int fd() const
Get the file descriptor.
SeekOption
Define the possible seek options.