xref: /haiku/src/add-ons/kernel/file_systems/ramfs/File.h (revision 820dca4df6c7bf955c46e8f6521b9408f50b2900)
1 // File.h
2 
3 #ifndef FILE_H
4 #define FILE_H
5 
6 #include "DataContainer.h"
7 #include "Node.h"
8 
9 class File : public Node, public DataContainer {
10 public:
11 	File(Volume *volume);
12 	virtual ~File();
13 
14 	Volume *GetVolume() const	{ return Node::GetVolume(); }
15 
16 	virtual status_t ReadAt(off_t offset, void *buffer, size_t size,
17 							size_t *bytesRead);
18 	virtual status_t WriteAt(off_t offset, const void *buffer, size_t size,
19 							 size_t *bytesWritten);
20 
21 	virtual status_t SetSize(off_t newSize);
22 	virtual off_t GetSize() const;
23 
24 	// debugging
25 	virtual void GetAllocationInfo(AllocationInfo &info);
26 };
27 
28 #endif	// FILE_H
29