MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / Ext2Node

Class Ext2Node

Kernel/include/fs/ext2.h:198–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196 class Ext2Volume;
197
198 class Ext2Node : public FsNode{
199 protected:
200 List<uint32_t> cachedBlocks;
201
202 Ext2Volume* vol;
203 ext2_inode_t e2inode;
204
205 FilesystemLock flock; // Lock on file data
206
207 friend class Ext2Volume;
208 public:
209 Ext2Node(Ext2Volume* vol, ext2_inode_t& ino, ino_t inode);
210
211 ssize_t Read(size_t, size_t, uint8_t *);
212 ssize_t Write(size_t, size_t, uint8_t *);
213 int ReadDir(DirectoryEntry*, uint32_t);
214 FsNode* FindDir(char* name);
215 int Create(DirectoryEntry*, uint32_t);
216 int CreateDirectory(DirectoryEntry*, uint32_t);
217
218 ssize_t ReadLink(char* pathBuffer, size_t bufSize);
219 int Link(FsNode*, DirectoryEntry*);
220 int Unlink(DirectoryEntry*, bool unlinkDirectories = false);
221 int Truncate(off_t length);
222
223 void Close();
224 void Sync();
225 };
226
227 class Ext2Volume : public FsVolume {
228 private:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected