31 #include <casacore/casa/aips.h>
32 #include <casacore/casa/IO/ByteIO.h>
33 #include <casacore/casa/BasicSL/String.h>
SeekOption
Define the possible seek options.
String: the storage and methods of handling collections of characters.
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)
Reset the position pointer to the given value.
void detach()
Detach the FILE.
virtual void skip(uInt howMany=1)
skip the specified number of files (ie tape marks) on the tape.
void setBlockSize(uInt sizeInBytes)
void fillRWFlags()
Determine if the file is readable and/or writable.
void fillSeekable()
Determine if the file is seekable.
TapeIO & operator=(const TapeIO &that)
uInt fixedBlockSize() const
returns the block size in bytes.
void attach(const Path &device, Bool writable=False)
Attach to the given tape device.
virtual Bool isSeekable() const
Is the tape device seekable?
virtual void write(Int64 size, const void *buf)
Write the specified number of bytes.
TapeIO(const TapeIO &that)
The following functions are made private so that the compiler does not generate default ones.
static void close(int fd)
virtual Bool isWritable() const
Is the tape device writable?
void setFixedBlockSize(uInt sizeInBytes)
Configure the tape device to use fixed length blocks of the specified size.
virtual ~TapeIO()
The destructor will only close the file if the appropriate constructor, or attach function,...
void setVariableBlockSize()
Configure the tape device to use variable length blocks.
virtual String fileName() const
Get the name of the attached device or return a zero length string if it cannot be determined.
virtual void rewind()
Rewind the tape device to the beginning.
TapeIO(int fd)
Construct from the given file descriptor.
TapeIO(const Path &device, Bool writable=False)
Construct from the given device.
uInt getBlockSize() const
virtual Int64 read(Int64 size, void *buf, Bool throwException=True)
Read size bytes from the tape.
virtual Int64 length()
Get the length of the tape device.
void attach(int fd)
Attach to the given file descriptor.
TapeIO()
Default constructor.
virtual void mark(uInt howMany=1)
write the specified number of filemarks.
static int open(const Path &device, Bool writable=False)
Some static convenience functions for file descriptor opening & closing.
virtual Bool isReadable() const
Is the tape device readable?
Bool fixedBlocks() const
returns True if the tape device is configured to use a fixed block size
this file contains all the compiler specific defines
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
bool Bool
Define the standard types used by Casacore.