< index
< 3. System layer
|
=====================================
3.4 Filesystem utilities
=====================================
|
|
Those are a few function that cannot be easily implemented in a portable way in C/C++. They have no python wrapper since python provides its own builtin functions.
All those functions return false if an error occured.
The first one creates a new directory.
C++ : static bool TCODSystem::createDirectory(const char *path)
C : bool TCOD_sys_create_directory(const char *path)
Parameter | Description |
path | Directory path. The immediate father directory (<path>/..) must exist and be writable. |
This one destroys a directory.
C++ : static bool TCODSystem::deleteDirectory(const char *path)
C : bool TCOD_sys_delete_directory(const char *path)
Parameter | Description |
path | Directory path. This directory must exist, be writable and empty. |
This one destroys a file.
C++ : static bool TCODSystem::deleteFile(const char *path)
C : bool TCOD_sys_delete_file(const char *path)
Parameter | Description |
path | File path. This file must exist and be writable. |