Donut Team is a labor of love, built and maintained by a small group of passionate developers. We invest our own time and resources to offer our tools, mods, and web services completely free of charge.

We don't run ads, and we will never sell your data - period.

If you've enjoyed anything we've created, please consider supporting our work with a one-time or monthly donation via our Ko-fi page . Every contribution helps us continue building great experiences for the community.

Dismiss
  • Modding Tools
  • Simpsons Hit & Run Multiplayer Server
  • Lua API Reference

File

Available since Version 1.0.

The File table provides functions for performing file operations in Simpsons Hit & Run Multiplayer Server mods.

The File table is restricted to your mod's directory (e.g., ./ServerMods/YourMod/) and cannot access files outside of this directory for security reasons.

Variables

This table does not have any variables.

Methods

Function Name Description
File.Exists Checks if a file exists at the specified path.
File.ReadAll Reads the entire content of a file.
File.ReadOffset Reads a portion of a file starting from a specific offset.
File.Require Requires a file, executing it if it hasn't been executed before.
File.Require Requires a file, executing it only once.
File.Write Writes content to a file.
File.Delete Deletes a file at the specified path.