autorefresh
autorefresh
This library lets you control GMod's Lua auto refresh system, which reloads a Lua file when it changes on disk without needing to restart the server.
You can add extra files/folders to be watched, or block specific files from ever being refreshed.
Supports: Linux32
Methods
Adds a single file to the list of files that are periodically checked for changes using a background thread pool. (See holylib_autorefresh_threads)
This is separate from folder watching and is useful for watching a file that isn't inside a watched folder.
This is separate from folder watching and is useful for watching a file that isn't inside a watched folder.
Adds a folder to GMod's Lua auto refresh watcher, the same way folders configured by the engine are watched.
Blocks (or unblocks) a specific file from ever being refreshed by the auto refresh system, even if it changes on disk.
autorefresh.RefreshFolders()
Re-runs GMod's auto refresh folder scan, the same scan that happens once when the server starts up.
This is useful after adding new folders to watch, to make sure they get picked up right away.
This is useful after adding new folders to watch, to make sure they get picked up right away.
Removes a file that was previously added with autorefresh.AddFileToRefresh.
Removes a folder that was previously added with autorefresh.AddFolderToRefresh.