1/* 2 * Copyright 2002-2007 Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef _SYM_LINK_H 6#define _SYM_LINK_H 7 8 9#include <Node.h> 10#include <StorageDefs.h> 11 12 13class BDirectory; 14class BPath; 15 16class BSymLink : public BNode { 17public: 18 BSymLink(); 19 BSymLink(const BSymLink& other); 20 BSymLink(const entry_ref* ref); 21 BSymLink(const BEntry* entry); 22 BSymLink(const char* path); 23 BSymLink(const BDirectory* dir, 24 const char* path); 25 virtual ~BSymLink(); 26 27 ssize_t ReadLink(char* buf, size_t size); 28 29 ssize_t MakeLinkedPath(const char* dirPath, 30 BPath* path); 31 ssize_t MakeLinkedPath(const BDirectory* dir, 32 BPath* path); 33 34 bool IsAbsolute(); 35 36private: 37 virtual void _MissingSymLink1(); 38 virtual void _MissingSymLink2(); 39 virtual void _MissingSymLink3(); 40 virtual void _MissingSymLink4(); 41 virtual void _MissingSymLink5(); 42 virtual void _MissingSymLink6(); 43 44 uint32 _reservedData[4]; 45 BEntry* fSecretEntry; 46 47private: 48 int get_fd() const; 49}; 50 51 52#endif // _SYM_LINK_H 53