Skip to content

isfolder

isfolder checks whether a given path exists and refers to a folder.

This is useful when verifying that a directory exists before writing files into it or listing its contents.

function isfolder(path: string): boolean

Parameters

Parameter Description
path The path to check.

Example

Checking folder existence
1
2
3
4
writefile("file7.txt", "")
makefolder("folder2")
print(isfolder("file7.txt")) -- Output: false
print(isfolder("folder2"))   -- Output: true