summaryrefslogtreecommitdiff
path: root/Source/Library/Userland/Binding/FSNode.class.h
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-20 19:21:34 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-20 19:21:34 +0200
commit9836acd720988af30250c2c1ec18d618664dea4e (patch)
tree9e26d7d65e1693d1a7f9fd93c9fd33b41d175464 /Source/Library/Userland/Binding/FSNode.class.h
parent90b49b6f171108f272ff529f7546bd9625ca7d17 (diff)
downloadMelon-9836acd720988af30250c2c1ec18d618664dea4e.tar.gz
Melon-9836acd720988af30250c2c1ec18d618664dea4e.zip
Started working on a userland shell
This means I'll have to do syscalls for everything I need.
Diffstat (limited to 'Source/Library/Userland/Binding/FSNode.class.h')
-rw-r--r--Source/Library/Userland/Binding/FSNode.class.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/Library/Userland/Binding/FSNode.class.h b/Source/Library/Userland/Binding/FSNode.class.h
new file mode 100644
index 0000000..eb25782
--- /dev/null
+++ b/Source/Library/Userland/Binding/FSNode.class.h
@@ -0,0 +1,23 @@
+#include <Syscall/RessourceCaller.class.h>
+#include <FSNode.iface.h>
+
+class FSNode : public RessourceCaller {
+ public:
+ static FSNode getRoot() {
+ return FSNode(RessourceCaller::sCall(FNIF_OBJTYPE, FNIF_SGETRFN));
+ }
+ FSNode(u32int id) : RessourceCaller(id, FNIF_OBJTYPE) {}
+
+ String getName() {
+ return String::unserialize(doCall(FNIF_GETNAME));
+ }
+ u8int type() {
+ return doCall(FNIF_TYPE);
+ }
+ FSNode getParent() {
+ return FSNode(doCall(FNIF_GETPARENT));
+ }
+ u64int getLength() {
+ return *((u64int*)doCall(FNIF_GETLENGTH));
+ }
+};