File

Simple file loading and saving helpers

Server Module - This can only be used on the server

This module only supports JSON formats

lib.file.load

Load a file and it's content

local file = lib.file.load(path, from_central)
Parameter TypeRequiredDescription

path

String

Path of the file

from_central

Boolean

If the directory should prefix saved_data

lib.file.save

Save a file and it's contents

lib.file.save(path, data, from_central)
Parameter TypeRequiredDescription

path

String

Path of the file

data

Object

Data to be saved

from_central

Boolean

If the directory should prefix saved_data

Last updated