isfolder
Returns whether a path points to a folder.
function isfolder(path: string): booleanSynopsis
How it works
Checks whether a directory exists at the given path within the workspace. Calls
GetFileAttributesA(path) and checks for the FILE_ATTRIBUTE_DIRECTORY flag. Returns false for files and non-existent paths.Usage
Ensure folder exists
if not isfolder("data") then
makefolder("data")
endParameters
path string Path to check.
Returns
boolean true if a folder exists at path.