Update 0.27 docs (#484)

* update doc/*/scripting/builtins/libinventory.md

* add doc/*/scripting/builtins/libgfx-weather.md

* update doc/*/scripting/builtins/libfile.md

* update doc/*/item-properties & update doc/*/scripting/builtins/libinventory.md

* add inventory.decrement docs

* update doc/*/scripting/builtins/libinventory.md
This commit is contained in:
MihailRis
2025-03-16 20:10:41 +03:00
committed by GitHub
parent a74a4fcf53
commit b1e854a73c
10 changed files with 358 additions and 2 deletions
+20
View File
@@ -144,3 +144,23 @@ file.prefix(path: str) --> str
```
Extracts the entry point (prefix) from the path. Example: `world:data/base/config.toml` -> `world`.
```lua
file.parent(path: str) --> str
```
Returns the path one level up. Example: `world:data/base/config.toml` -> `world:data/base`
```lua
file.path(path: str) --> str
```
Removes the entry point (prefix) from the path. Example: `world:data/base/config.toml` -> `data/base/config.toml`
```lua
file.join(directory: str, path: str) --> str
```
Joins the path. Example: `file.join("world:data", "base/config.toml)` -> `world:data/base/config.toml`.
You should use this function instead of concatenating with `/`, since `prefix:/path` is not valid.