The Pedigree Project  0.1
FatSymlink.h
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef FAT_SYMLINK_H
21 #define FAT_SYMLINK_H
22 
23 #include "modules/system/vfs/Symlink.h"
24 #include "pedigree/kernel/processor/types.h"
25 #include "pedigree/kernel/time/Time.h"
26 #include "pedigree/kernel/utilities/String.h"
27 
28 class File;
29 
37 class FatSymlink : public Symlink
38 {
39  public:
40  FatSymlink(
41  String name, Time::Timestamp accessedTime, Time::Timestamp modifiedTime,
42  Time::Timestamp creationTime, uintptr_t inode, class Filesystem *pFs,
43  size_t size, uint32_t dirClus = 0, uint32_t dirOffset = 0,
44  File *pParent = 0);
45  virtual ~FatSymlink()
46  {
47  }
48  uint32_t getDirCluster()
49  {
50  return m_DirClus;
51  }
52  void setDirCluster(uint32_t custom)
53  {
54  m_DirClus = custom;
55  }
56  uint32_t getDirOffset()
57  {
58  return m_DirOffset;
59  }
60  void setDirOffset(uint32_t custom)
61  {
62  m_DirOffset = custom;
63  }
64 
70  virtual uint64_t readBytewise(
71  uint64_t location, uint64_t size, uintptr_t buffer,
72  bool bCanBlock = true);
76  virtual uint64_t writeBytewise(
77  uint64_t location, uint64_t size, uintptr_t buffer,
78  bool bCanBlock = true);
79 
80  private:
81  uint32_t m_DirClus;
82  uint32_t m_DirOffset;
83 };
84 
85 #endif
Definition: String.h:49
Definition: File.h:66