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