1 /* 2 * Copyright 2004-2013, Axel Dörfler, axeld@pinc-software.de. 3 * This file may be used under the terms of the MIT License. 4 */ 5 6 7 #include "Link.h" 8 9 10 namespace BFS { 11 12 13 Link::Link(Volume &volume, block_run run) 14 : File(volume, run) 15 { 16 } 17 18 19 Link::Link(Volume &volume, off_t id) 20 : File(volume, id) 21 { 22 } 23 24 25 Link::Link(const Stream &stream) 26 : File(stream) 27 { 28 } 29 30 31 status_t 32 Link::InitCheck() 33 { 34 return fStream.InitCheck(); 35 } 36 37 38 status_t 39 Link::ReadLink(char *buffer, size_t bufferSize) 40 { 41 return fStream.ReadLink(buffer, bufferSize); 42 } 43 44 45 ssize_t 46 Link::ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize) 47 { 48 return B_NOT_ALLOWED; 49 } 50 51 52 ssize_t 53 Link::WriteAt(void *cookie, off_t pos, const void *buffer, size_t bufferSize) 54 { 55 return B_NOT_ALLOWED; 56 } 57 58 59 int32 60 Link::Type() const 61 { 62 return S_IFLNK; 63 } 64 65 66 } // namespace BFS 67