directory_destroy

This function will remove a directory with the given name in the save area.

NOTE This function will not work on HTML5 as you cannot create or remove directories in the browser local storage.

WARNING This may not work as you expect due to GameMaker being sandboxed! Please see the section on The File System for more information.

 

Syntax:

directory_destroy(dname)

ArgumentTypeDescription
dnameStringThe name of the directory to remove.

 

Returns:

N/A

 

Example:

if (directory_exists("DLC"))
{
    directory_destroy("DLC");
}

This will check to see if the specified directory exists in the local data folder and, if it does, it is removed.