Lua API
  • 🔎Overview
  • Getting started
    • 🚀Creating scripts
    • 📓Metadata
    • ☎ïļCallbacks
    • 🧠Examples
    • 🌐Useful resources
  • Documentation
    • ⚙ïļNamespaces
      • ðŸ–ĨïļGui
      • ✏ïļRender
      • 🏎ïļEngine
      • ðŸ”ĒMath
      • ⚙ïļUtilities
      • 🙎Entities
      • 📖Database
      • ðŸ–ąïļInput
      • 🌌Panorama
      • ðŸŠķMaterials
      • 📂Filesystem
      • 🗃ïļZip
    • ⚙ïļInstances
      • ⚙ïļGlobal Vars
      • ⚙ïļFatality
      • ⚙ïļGamerules
      • ⚙ïļServer
    • ⚙ïļDatatypes
      • ðŸ–Ĩïļcontrol
      • ðŸ–Ĩïļcheckbox
      • ðŸ–Ĩïļcombobox
      • ðŸ–Ĩïļcolor_picker
      • ðŸ–Ĩïļslider
      • ðŸ–Ĩïļtextbox
      • ðŸ–Ĩïļlist
      • ⚙ïļentity
      • ⚙ïļplayer_info
      • ⚙ïļweapon_info
      • ⚙ïļuser_cmd
      • ⚙ïļtrace_t
      • ⚙ïļvec3
      • ⚙ïļtimer
      • ⚙ïļcvar
      • ⚙ïļshot_info
      • ⚙ïļgame_event
      • ⚙ïļmaterial
      • ⚙ïļmaterial_var
      • ⚙ïļzip
      • ⚙ïļanimator
Powered by GitBook

ÂĐ 2025 - FATALITY

On this page
  • Functions
  • read
  • read_stream
  • write
  • write_stream
  • remove
  • exists
  • is_file
  • is_dir
  • create_dir
  1. Documentation
  2. Namespaces

Filesystem

filesystem namespace

Functions

read

fs.read("some_file.txt")

path

string

path to file

Returns:

data

string

read_stream

fs.read_stream("some_file.txt")

path

string

path to file

Returns:

data

table of char

write

fs.write("some_file.txt", "data")

path

string

path to file

data

string

data to write to file

write_stream

fs.write_stream("some_file.txt", {"a", "b", "c"})

path

string

path to file

data

table of char

data in bytes to write to file

remove

fs.remove("some_file.txt")

path

string

path to file

exists

fs.exists("some_file.txt")

path

string

path to file or directory

Returns:

true if file exists

boolean

is_file

fs.is_file("some_file.txt")

path

string

path to file

Returns:

true if path leads to a file

boolean

is_dir

fs.is_dir("some_file.txt")

path

string

path to directory

Returns:

true if path leads to a directory

boolean

create_dir

fs.create_dir("folder/some_directory")

path

string

path to directory

PreviousMaterialsNextZip

Last updated 2 years ago

⚙ïļ
📂
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Parameter
Datatype
Description
Parameter
Datatype
Description
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description