Skip to content

fs

luau
local fs = require("@std/fs")

fs.close

luau
(file: file) -> ()

fs.copy

luau
(src: pathlike, dest: pathlike) -> ()

fs.createdirectory

luau
(path: pathlike, options: createdirectoryoptions?) -> ()

fs.exists

luau
(path: pathlike) -> boolean
luau
(src: pathlike, dest: pathlike) -> ()

fs.listdirectory

luau
(path: pathlike) -> { directoryentry }

fs.metadata

luau
(path: pathlike) -> metadata

fs.open

luau
(path: pathlike, mode: handlemode?) -> file

fs.read

luau
(file: file) -> string

fs.readfiletostring

luau
(filepath: pathlike) -> string

fs.remove

luau
(path: pathlike) -> ()

fs.removedirectory

luau
(path: pathlike, options: removedirectoryoptions?) -> ()
luau
(src: pathlike, dest: pathlike) -> ()

fs.type

luau
(path: pathlike) -> type

fs.walk

luau
(path: pathlike, options: walkoptions?) -> () -> path?

fs.watch

luau
(path: pathlike, callback: (filename: pathlike, event: watchevent) -> ()) -> watchhandle

fs.write

luau
(file: file, contents: string) -> ()

fs.writestringtofile

luau
(filepath: pathlike, contents: string) -> ()