1 /* Stream - inode stream access functions
3 ** Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
4 ** Distributed under the terms of the MIT License.
19 class Stream
: public bfs_inode
{
21 Stream(Volume
&volume
, block_run run
);
22 Stream(Volume
&volume
, off_t id
);
26 Volume
&GetVolume() const { return fVolume
; }
28 status_t
FindBlockRun(off_t pos
, block_run
&run
, off_t
&offset
);
29 status_t
ReadAt(off_t pos
, uint8
*buffer
, size_t *length
);
31 status_t
GetName(char *name
, size_t size
) const;
32 off_t
Size() const { return data
.Size(); }
33 off_t
ID() const { return fVolume
.ToVnode(inode_num
); }
34 status_t
ReadLink(char *buffer
, size_t bufferSize
);
36 bool IsContainer() const { return Mode() & (S_IFDIR
| S_INDEX_DIR
| S_ATTR_DIR
); }
37 bool IsSymlink() const { return S_ISLNK(Mode()); }
38 bool IsIndex() const { return false; }
40 static Node
*NodeFactory(Volume
&volume
, off_t id
);
43 status_t
GetNextSmallData(const small_data
**_smallData
) const;