28 #ifndef CASA_FILEDESIO_H
29 #define CASA_FILEDESIO_H
149 virtual void fsync();
157 static void close (
int fd);
virtual String fileName() const
Get the file name of the file attached.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
void fillSeekable()
Determine if the file is seekable.
SeekOption
Define the possible seek options.
FiledesIO()
Default constructor.
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)
Reset the position pointer to the given value.
Class for unbuffered IO on a file.
virtual ~FiledesIO()
The destructor detaches, but does not close the file.
void attach(int fd, const String &fileName)
Attach to the given file descriptor.
void detach()
Detach from the file descriptor.
virtual Int64 pread(Int64 size, Int64 offset, void *buf, Bool throwException=True)
Like read except reads from offset of the start of the file.
Abstract base class for IO on a byte stream.
virtual Bool isSeekable() const
Is the IO stream seekable?
virtual Bool isWritable() const
Is the IO stream writable?
static int open(const Char *name, Bool writable=False, Bool throwExcp=True)
bool Bool
Define the standard types used by Casacore.
static void close(int fd)
virtual void pwrite(Int64 size, Int64 offset, const void *buf)
Write the number of bytes at offset from start of the file.
virtual Int64 read(Int64 size, void *buf, Bool throwException=True)
Read size bytes from the descriptor.
virtual Int64 length()
Get the length of the byte stream.
virtual void write(Int64 size, const void *buf)
Write the number of bytes.
int fd() const
Get the file descriptor.
String: the storage and methods of handling collections of characters.
virtual Bool isReadable() const
Is the IO stream readable?
virtual void fsync()
Fsync the file (i.e.
void setWritable()
Set that the IO stream is writable.
void fillRWFlags(int fd)
Determine if the file descriptor is readable and/or writable.
static int create(const Char *name, int mode=0666)
Some static convenience functions for file create/open/close.
FiledesIO & operator=(const FiledesIO &that)
Assignment, should not be used.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.