Returns whether the indicated directory exists.


GML Code Example


Argument Description
dname The name of the directory to look for.

Returns: Boolean.


This function will return true if the indicated directory exists or false if it does not. The specified name must include the full path, not a relative path and you cannot access any directories from out-with the game bundle as all games are sandboxed.

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


GML Code Example

if directory_exists(working_directory + "\Saves\")
    file = file_find_first(working_directory + "\Saves\*.doc", fa_readonly);

This will check to see if the specified directory exists then, if it does, go there and return the first "read only" doc file found.

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here