Initial commit of the new BaseFile implementation. It provides a common ground for file objects across platforms and divides responsibilities between the Common::File class and a base file implementation.
Also rearranged the factories into a new directory for clarity. Note 1: The posix-file.h and cpp files are for testing only. Only the ds, ps2 and symbian architecture will use special BaseFile based objects. Note 2: The current code does not yet make use of this new structure, since the Common::File remains intact. svn-id: r28395
This commit is contained in:
parent
9752c75f40
commit
1400d28bfb
37 changed files with 718 additions and 42 deletions
|
@ -1,18 +0,0 @@
|
|||
#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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue