mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
update doс/*/scripting/builtins/libfile.md
This commit is contained in:
parent
31c227152b
commit
2f2da3b56a
2 changed files with 10 additions and 1 deletions
|
|
@ -163,6 +163,12 @@ file.ext(path: str) --> str
|
|||
|
||||
Extracts the extension from the path. Example: `world:data/base/config.toml` -> `toml`.
|
||||
|
||||
```lua
|
||||
file.remove_ext(path: string) -> string
|
||||
```
|
||||
|
||||
Returns the path without the extension. Example: `world:data/base/config.toml` -> `world:data/base/config`.
|
||||
|
||||
```lua
|
||||
file.prefix(path: str) --> str
|
||||
```
|
||||
|
|
|
|||
|
|
@ -78,6 +78,9 @@ file.stem(путь: string) -> string
|
|||
|
||||
-- Извлекает расширение из пути. Пример: `world:data/base/config.toml` -> `toml`.
|
||||
file.ext(путь: string) -> string
|
||||
|
||||
-- Возвращает путь без расширения. Пример: `world:data/base/config.toml` -> `world:data/base/config`.
|
||||
file.remove_ext(путь: string) -> string
|
||||
```
|
||||
|
||||
## Директории
|
||||
|
|
@ -145,4 +148,4 @@ file.open(путь: string, режим: string) -> io_stream
|
|||
-- * `/tmp/` или `\\\\.\\pipe\\` добавлять не нужно - движок делает это автоматически.
|
||||
-- * Недоступен режим с `+`
|
||||
file.open_named_pipe(имя: string, режим: string) -> io_stream
|
||||
```
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue