Go to the documentation of this file.
28 #ifndef CASA_FILEDESIO_H
29 #define CASA_FILEDESIO_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/IO/ByteIO.h>
34 #include <casacore/casa/BasicSL/String.h>
virtual Bool isWritable() const
Is the IO stream writable?
void fillSeekable()
Determine if the file is seekable.
static int create(const Char *name, int mode=0666)
Some static convenience functions for file create/open/close.
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)
Reset the position pointer to the given value.
FiledesIO(int fd, const String &fileName=String())
Construct from the given file descriptor.
Class for unbuffered IO on a file.
virtual String fileName() const
Get the file name of the file attached.
FiledesIO()
Default constructor.
void detach()
Detach from the file descriptor.
this file contains all the compiler specific defines
virtual Int64 read(Int64 size, void *buf, Bool throwException=True)
Read size bytes from the descriptor.
FiledesIO & operator=(const FiledesIO &that)
Assignment, should not be used.
virtual void fsync()
Fsync the file (i.e.
static int open(const Char *name, Bool writable=False, Bool throwExcp=True)
virtual void write(Int64 size, const void *buf)
Write the number of bytes.
virtual Bool isReadable() const
Is the IO stream readable?
void setWritable()
Set that the IO stream is writable.
virtual ~FiledesIO()
The destructor detaches, but does not close the file.
FiledesIO(const FiledesIO &that)
Copy constructor, should not be used.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual Bool isSeekable() const
Is the IO stream seekable?
void fillRWFlags(int fd)
Determine if the file descriptor is readable and/or writable.
void attach(int fd, const String &fileName)
Attach to the given file descriptor.
virtual void pwrite(Int64 size, Int64 offset, const void *buf)
Write the number of bytes at offset from start of the file.
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
int fd() const
Get the file descriptor.
virtual Int64 length()
Get the length of the byte stream.
Abstract base class for IO on a byte stream.
static void close(int fd)
SeekOption
Define the possible seek options.
virtual Int64 pread(Int64 size, Int64 offset, void *buf, Bool throwException=True)
Like read except reads from offset of the start of the file.