summaryrefslogtreecommitdiff
path: root/Source/Library/Userland
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-23 19:40:08 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-23 19:40:08 +0200
commit48de0cd029b52f64f76345b6e1fdf3cde5c58de3 (patch)
tree792061381c556bef6639b327716cca107f6168c5 /Source/Library/Userland
parentf0556ed7f051fb101dc68752526696365bf79a11 (diff)
downloadMelon-48de0cd029b52f64f76345b6e1fdf3cde5c58de3.tar.gz
Melon-48de0cd029b52f64f76345b6e1fdf3cde5c58de3.zip
More work on syscalls and shell
Diffstat (limited to 'Source/Library/Userland')
-rw-r--r--Source/Library/Userland/Binding/FSNode.class.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/Source/Library/Userland/Binding/FSNode.class.h b/Source/Library/Userland/Binding/FSNode.class.h
index 95802a4..61ac991 100644
--- a/Source/Library/Userland/Binding/FSNode.class.h
+++ b/Source/Library/Userland/Binding/FSNode.class.h
@@ -4,7 +4,13 @@
class FSNode : public RessourceCaller {
public:
static FSNode getRoot() {
- return FSNode(RessourceCaller::sCall(FNIF_OBJTYPE, FNIF_SGETRFN));
+ return FSNode(sCall(FNIF_OBJTYPE, FNIF_SGETRFN));
+ }
+ static FSNode getCwd() {
+ return FSNode(sCall(FNIF_OBJTYPE, FNIF_SGETCWD));
+ }
+ static FSNode find(String path) { //Finds a node starting from root node
+ return FSNode(sCall(FNIF_OBJTYPE, FNIF_SFIND, (u32int)&path, 0));
}
FSNode(u32int id) : RessourceCaller(id, FNIF_OBJTYPE) {}
@@ -32,4 +38,16 @@ class FSNode : public RessourceCaller {
String path() {
return String::unserialize(doCall(FNIF_GETPATH));
}
+ void setCwd() {
+ doCall(FNIF_SETCWD);
+ }
+ FSNode getChild(u32int idx) {
+ return FSNode(doCall(FNIF_GETIDXCHILD, idx));
+ }
+ FSNode getChild(String name) {
+ return FSNode(doCall(FNIF_GETNAMECHILD, (u32int)&name));
+ }
+ FSNode findFrom(String path) { //Search a filesystem node starting from here
+ return FSNode(sCall(FNIF_OBJTYPE, FNIF_SFIND, (u32int)&path, resId()));
+ }
};