1 /* 2 ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 ** Distributed under the terms of the MIT License. 4 */ 5 #ifndef LINK_H 6 #define LINK_H 7 8 9 #include <boot/vfs.h> 10 11 #include "File.h" 12 13 14 namespace BFS { 15 16 class Link : public File { 17 public: 18 Link(Volume &volume, block_run run); 19 Link(Volume &volume, off_t id); 20 Link(const Stream &stream); 21 22 status_t InitCheck(); 23 24 virtual status_t ReadLink(char *buffer, size_t bufferSize); 25 26 virtual ssize_t ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize); 27 virtual ssize_t WriteAt(void *cookie, off_t pos, const void *buffer, size_t bufferSize); 28 29 virtual int32 Type() const; 30 }; 31 32 } // namespace BFS 33 34 #endif /* FILE_H */ 35