Filesystem
Basic filesystem functions for basic filesystem needs.
-- Import the filesystem library.
local fs = require("@lib/filesystem")writefile(file: string)
-- Write a file.
fs.writefile(content: string, filename: string, location: string) -- Creates a new file if it doesn't exist, else it overrides.
-- Example
fs.writefile("These tacos are tasty, hawk tuah!", "what.txt", "./Yapping") -- Create a new folder if it doesn't exist.readfile(file: string): buffer
-- Read a file.
fs.readfile(file: string): string
-- Example
fs.readfile("./Yapping/what.txt") -- Errors if it could not find the file.deletefile(file: string)
Last updated