FileBase::set_extent(offset, length) constrains seek() and tell()
This commit is contained in:
@@ -59,6 +59,7 @@ public:
|
||||
virtual bool isOpen() const { return _fd >= 0; }
|
||||
int getFd() const { return _fd; }
|
||||
const char *getName() const { return _name; }
|
||||
virtual off_t st_size() const; // { return _length; }
|
||||
|
||||
protected:
|
||||
void sopen();
|
||||
@@ -67,12 +68,15 @@ protected:
|
||||
virtual void write(const void *buf, int len);
|
||||
virtual void seek(off_t off, int whence);
|
||||
virtual off_t tell() const;
|
||||
virtual void set_extent(off_t offset, off_t length);
|
||||
|
||||
int _fd;
|
||||
int _flags;
|
||||
int _shflags;
|
||||
int _mode;
|
||||
const char *_name;
|
||||
off_t _offset;
|
||||
off_t _length;
|
||||
public:
|
||||
struct stat st;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user