Skip to content
File systemReference

isfile

Check whether a workspace path is an existing file.

Details#

Check whether a workspace path is an existing file. True for an existing non-directory path; false for a missing path or a folder. Invalid paths still cause an error.

Signature#

Luau
isfile(path: string): boolean

Parameters#

ParameterTypeDescription
pathstringUTF-8 path relative to the application's workspace.

Returns#

True for an existing non-directory path; false for a missing path or a folder. Invalid paths still cause an error.

Examples#

Local example

Luau
print(isfile("docs-example/note.txt"))