ES3.DirectoryExists

public static bool DirectoryExists(string directoryPath, ES3Settings settings)

Description

Checks whether a key exists in a file.

Parameters

[table th=”0″]directoryPath,”[Optional] The relative or absolute path of the directory we want to check the existence of.”

settings,”[Optional] The settings we want to use to override the default settings.”[/table]

Returns

True if the directory exists, otherwise false.

Examples

C#

// Checks whether a directory exists before loading from a file in it.
if(ES3.DirectoryExists("myDirectory/"))
    myKey = ES3.Load<int>("myInt", "myDirectory/myFile.es3");

JS

// Checks whether a directory exists before loading from a file in it.
if(ES3.DirectoryExists("myDirectory/"))
    myKey = ES3.Load.<int>("myInt", "myDirectory/myFile.es3");