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

isfile

Returns whether a path points to a file.

function isfile(path: string): boolean

Synopsis

How it works

Checks whether a file exists at the given path within the workspace directory. Internally calls GetFileAttributesA(path) and verifies the result is not INVALID_FILE_ATTRIBUTES and does not have the FILE_ATTRIBUTE_DIRECTORY flag. Returns false for directories.

Usage

Conditional read
if isfile("config.json") then
	local cfg = readfile("config.json")
end

Parameters

path string
Path to check.

Returns

boolean true if a file exists at path.