summaryrefslogtreecommitdiff
path: root/Source/Library
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-23 21:06:23 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-23 21:06:23 +0200
commit5dd48c50c0cf7793a5dafa6be769c8a3f8b9ab60 (patch)
tree75ee8e14bf7684394a6a663c90b5c26dc5246702 /Source/Library
parent66630e4154b7c1c47d6223fe5a8607cd269446a0 (diff)
downloadMelon-5dd48c50c0cf7793a5dafa6be769c8a3f8b9ab60.tar.gz
Melon-5dd48c50c0cf7793a5dafa6be769c8a3f8b9ab60.zip
Added some screenshots (\o/) and implemented mkdir in userland.
Diffstat (limited to 'Source/Library')
-rw-r--r--Source/Library/Interface/FSNode.iface.h9
-rw-r--r--Source/Library/Userland/Binding/FSNode.class.h5
2 files changed, 14 insertions, 0 deletions
diff --git a/Source/Library/Interface/FSNode.iface.h b/Source/Library/Interface/FSNode.iface.h
index 3a5dfad..e6c45d3 100644
--- a/Source/Library/Interface/FSNode.iface.h
+++ b/Source/Library/Interface/FSNode.iface.h
@@ -1,6 +1,14 @@
#ifndef DEF_FSNODE_IFACE_H
#define DEF_FSNODE_IFACE_H
+/*
+ * The FSNode interface handles all this :
+ * - Navigating in the filesystem
+ * - Listing contents of directories
+ * - Creating/removing/truncating files and directories
+ * - Getting/Setting current working directory (CWD)
+ */
+
enum {
NT_FILE = 1,
NT_DIRECTORY = 2,
@@ -14,6 +22,7 @@ enum {
#define FNIF_SGETRFN 0
#define FNIF_SGETCWD 1 //Get current working directory
#define FNIF_SFIND 2 //Find a node following a path from a node
+#define FNIF_SMKDIR 3 //Makes a directory
#define FNIF_GETNAME 0x10
#define FNIF_TYPE 0x11
diff --git a/Source/Library/Userland/Binding/FSNode.class.h b/Source/Library/Userland/Binding/FSNode.class.h
index 1fdc7ef..6a860ea 100644
--- a/Source/Library/Userland/Binding/FSNode.class.h
+++ b/Source/Library/Userland/Binding/FSNode.class.h
@@ -61,6 +61,11 @@ inline FSNode find(String name, FSNode cwd = FSNode(0)) {
return FSNode(RessourceCaller::sCall(FNIF_OBJTYPE, FNIF_SFIND, (u32int)&name, cwd.resId()));
}
+inline FSNode mkdir(String name, FSNode cwd = FSNode(0)) {
+ if (!cwd.valid()) cwd = rootNode();
+ return FSNode(RessourceCaller::sCall(FNIF_OBJTYPE, FNIF_SMKDIR, (u32int)&name, cwd.resId()));
+}
+
}
#endif