< 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)

ParameterDescription
pathDirectory 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)

ParameterDescription
pathDirectory 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)

ParameterDescription
pathFile path. This file must exist and be writable.
insert a comment