aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/posix/posix-fs-factory.cpp
blob: bed3dc5f8fd14007a8969f0d51658fc092b7039e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "backends/fs/posix/posix-fs-factory.h"
#include "backends/fs/posix/posix-fs.cpp"

DECLARE_SINGLETON(POSIXFilesystemFactory);

AbstractFilesystemNode *POSIXFilesystemFactory::makeRootFileNode() const {
	return new POSIXFilesystemNode();
}

AbstractFilesystemNode *POSIXFilesystemFactory::makeCurrentDirectoryFileNode() const {
	char buf[MAXPATHLEN];
	getcwd(buf, MAXPATHLEN);
	return new POSIXFilesystemNode(buf, true);
}

AbstractFilesystemNode *POSIXFilesystemFactory::makeFileNodePath(const String &path) const {
	return new POSIXFilesystemNode(path, true);
}