blob: 63229bf3078b69f7bc2e52cf679d34818c9f1897 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef DEF_VFS_NS_H
#define DEF_VFS_NS_H
#include <VFS/DirectoryNode.class.h>
#include <VFS/FileSystem.proto.h>
typedef FileSystem* (* mountcallback)(Partition* partition);
namespace VFS {
void registerMountCallback(mountcallback mcb);
bool mount(Partition* partition, DirectoryNode *mountpoint);
bool setRootNode(DirectoryNode* root);
DirectoryNode* getRootNode();
FSNode* find(const String& path, FSNode* start = 0);
FSNode* createFile(const String& path, FSNode* start = 0);
FSNode* createDirectory(const String& path, FSNode* start = 0);
FSNode* mkdir(const String& path, FSNode* start = 0); //Same as createDirectory, except it checks for parent directory writablilty by current process
bool remove(FSNode* node);
bool remove(const String& path, FSNode* start = 0); //Returns false for non-empty directories
String path(FSNode* node); //Returns complete path for a node
}
#endif
|