summaryrefslogtreecommitdiff
path: root/Source/Kernel/VFS/FSNode.proto.h
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-09-13 13:09:10 +0200
committerAlexis211 <alexis211@gmail.com>2009-09-13 13:09:10 +0200
commitb808b613a5c7e0b6c6c45b28f7f0169dc13afaa2 (patch)
tree99d656cfc6425f3d4720a8d1bd3b7a5717d0a558 /Source/Kernel/VFS/FSNode.proto.h
parentbdf19d4a139005390670380cb2c811febdfa5747 (diff)
downloadMelon-b808b613a5c7e0b6c6c45b28f7f0169dc13afaa2.tar.gz
Melon-b808b613a5c7e0b6c6c45b28f7f0169dc13afaa2.zip
Created some files
Diffstat (limited to 'Source/Kernel/VFS/FSNode.proto.h')
-rw-r--r--Source/Kernel/VFS/FSNode.proto.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Kernel/VFS/FSNode.proto.h b/Source/Kernel/VFS/FSNode.proto.h
index bc350f9..62d28be 100644
--- a/Source/Kernel/VFS/FSNode.proto.h
+++ b/Source/Kernel/VFS/FSNode.proto.h
@@ -22,15 +22,16 @@ class FSNode {
FSNode *m_parent;
u32int m_inode;
- public:
FSNode(String name, FileSystem* fs, FSNode* parent, u32int inode, u32int length = 0, u32int permissions = 0777,
u32int uid = 0, u32int gid = 0) :
m_name(name), m_fs(fs), m_parent(parent), m_inode(inode), m_length(length), m_premissions(permissions),
m_uid(uid), m_gid(gid) {}
+
+ public:
virtual u8int type() = 0;
- String getName() { return m_name; }
+ const String& getName() { return m_name; }
u32int getLength() { return m_length; }
u32int getPermissions() { return m_permissions; }
u32int getUid() { return m_uid; }
@@ -39,6 +40,7 @@ class FSNode {
FSNode* getParent() { return m_parent; }
u32int getInode() { return m_inode; }
+ protected:
//Must be implemented by *FSNode
virtual bool FSSetName(String name) = 0;
virtual bool FSTruncate() = 0;
@@ -47,6 +49,7 @@ class FSNode {
virtual bool FSSetGid(u32int gid) = 0;
virtual bool FSSetParent(FSNode* parent) = 0;
+ public:
bool setName(String name) {
bool b = FSSetName(name);
if (b) m_name = name;