VINDICTA
Filesystem · Function
Bunni.fun
ChocoSploit
Cryptic
Potassium
Seliware
SirHurt
Solara
Velocity
Volcano
Volt
Wave
Xeno

isfolder

Returns whether a path points to a folder.

function isfolder(path: string): boolean

Synopsis

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

Parameters

path string
Path to check.

Returns

boolean true if a folder exists at path.