i like to create a folder "save/example_001/class_to_test" in one function-call (recursivly)
how do i do that with irrlicht?
EDIT:
when i try to add something like this to irrlicht by writing some static functions to CFileSystem
- cpp Code: Select all
CFileSystem
{
// ...
public:
//! Determines if a file exists and can be opened.
virtual bool existFile(const path& filename) const;
//! Determines if a directory exists and can be opened.
virtual bool existDirectory(const path& filename) const;
//! creates a file on native FileSystem or a virtual one, depending on FileSystemType
virtual bool createFile(const path& filename, s32 mode = 0777 );
//! creates a directory on native FileSystem or a virtual one, depending on FileSystemType
virtual bool createDirectory(const path& filename, s32 mode = 0777 );
//! deletes a file from native FileSystem or a virtual one, depending on FileSystemType
virtual bool removeFile(const path& filename);
//! deletes a directory from native FileSystem or a virtual one, depending on FileSystemType
virtual bool removeDirectory(const path& filename);
// ...
}
so that i dont rely on any IrrlichtDevice*, IFileSystem* Pointer,
will that be conform to irrlicht coding rules and maybe accepted for svn-merge?
- cpp Code: Select all
// resulting code to create a folder
// #1 function extracts path from fileName
// #2 function recursivly creates folders
io::IFileSystem::mkdir( "save/example_001/class_to_test/image_000.png" );
