summaryrefslogtreecommitdiff
path: root/Source/Kernel/VFS/VFS.ns.cpp
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-23 20:43:48 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-23 20:43:48 +0200
commit66630e4154b7c1c47d6223fe5a8607cd269446a0 (patch)
tree21995ed408e9ecbaba48f29ed67c91c4b0dad950 /Source/Kernel/VFS/VFS.ns.cpp
parent48de0cd029b52f64f76345b6e1fdf3cde5c58de3 (diff)
downloadMelon-66630e4154b7c1c47d6223fe5a8607cd269446a0.tar.gz
Melon-66630e4154b7c1c47d6223fe5a8607cd269446a0.zip
Some changes, and implemented rm in userland shell.
Diffstat (limited to 'Source/Kernel/VFS/VFS.ns.cpp')
-rw-r--r--Source/Kernel/VFS/VFS.ns.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/Kernel/VFS/VFS.ns.cpp b/Source/Kernel/VFS/VFS.ns.cpp
index 30ad2d7..2333a36 100644
--- a/Source/Kernel/VFS/VFS.ns.cpp
+++ b/Source/Kernel/VFS/VFS.ns.cpp
@@ -103,9 +103,7 @@ FSNode* createDirectory(const String& path, FSNode* start) {
}
}
-bool remove(const String& path, FSNode* start) {
- FSNode* node = find(path, start);
- if (node == NULL) return false;
+bool remove(FSNode* node) {
FSNode* parent = node->getParent();
if (parent == NULL) return false;
@@ -116,6 +114,12 @@ bool remove(const String& path, FSNode* start) {
}
}
+bool remove(const String& path, FSNode* start) {
+ FSNode* node = find(path, start);
+ if (node == NULL) return false;
+ return remove(node);
+}
+
String path(FSNode* node) {
String path;