Revision Difference
Filesystem#561168
<title>Filesystem</title>⤶
⤶
This page will explain different things about Gmod's Filesystem. ⤶
<note>This page is still being worked and is currently unfinished</note>⤶
⤶
# Searchpaths⤶
⤶
The Filesystem uses search paths to find all necessary files. ⤶
A search path is just a normal path to a folder with a given name like `GAME` ⤶
You can add custom search paths by adding them to the `garrysmod/cfg/mount.cfg` ⤶
You can see all search paths <page text="here">File_Search_Paths</page> or you can print them with the `path` command.⤶
⤶
The `LUA` search path is just a redirect to the `lsv`, `lsc` or `LuaMenu` search path depending on your <page text="Realm">States</page>.⤶
⤶
## Search order⤶
⤶
This is how the filesystem currently searches thru the `GAME` path:⤶
- All `thirdparty` search paths (Including the `garrysmod/workshop` folder)⤶
- `garrysmod/overrides/` folder⤶
- `garrysmod/` folder⤶
- `sourceengine/` folder⤶
- `platform/` folder⤶
- Mounted Games⤶
- `garrysmod/download/` folder⤶
- `garrysmod/fallbacks` folder⤶
⤶
This is how the filesystem currently searches thru the `MOD` path:⤶
- `garrysmod/overrides/` folder⤶
- `garrysmod/` folder⤶
- `garrysmod/fallbacks` folder⤶
⤶
### garrysmod/overrides/⤶
⤶
The overrides folder is used by some .vpk files, and it allows you to override the results of the filesystem. ⤶
This can be useful for this like this: ⤶
You can create the folder and copy the `lua` folder into it and for example edit the `menu.lua` file without having to worry about Steam deleting your changes.⤶
<note>Creating the `garrysmod/overrides` folder can cause Issues with Gmod when you for example don't copy all Lua Files.</note>⤶
⤶
### garrysmod/workshop/⤶
⤶
The workshop folder only exists in the filesystem. ⤶
The workshop folder contains the content of all workshop addons that are mounted.⤶
You could create it on your drive and mess with it, but you probably shouldn't.