scummvm/backends/fs/posix/POSIXFilesystemFactory.cpp
2007-05-03 02:39:33 +00:00

26 lines
747 B
C++

#include "backends/fs/posix/POSIXFilesystemFactory.h"
#include "backends/fs/posix/posix-fs.cpp"
POSIXFilesystemFactory *POSIXFilesystemFactory::_instance = 0;
POSIXFilesystemFactory *POSIXFilesystemFactory::instance(){
if(_instance == 0){
_instance = new POSIXFilesystemFactory();
}
return _instance;
}
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);
}