mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2026-04-04 15:12:46 +02:00
Updated Filesystem API (markdown)
@@ -192,14 +192,16 @@ Tries to copy file from first path to second one. Returns `true` on success, `fa
|
||||
|
||||
### filesystem.**name**(*string* path): *string* name
|
||||
|
||||
Returns file name from given path:
|
||||
Returns file name from given path. Keeps end slash if any:
|
||||
|
||||
```lua
|
||||
filesystem.name("/MineOS/Pictures/Dick.pic")
|
||||
filesystem.name("/MineOS/Pictures/Vagina/")
|
||||
```
|
||||
|
||||
```
|
||||
> Dick.pic
|
||||
> Vagina/
|
||||
```
|
||||
|
||||
### filesystem.**path**(*string* path): *string* parentPath
|
||||
@@ -216,14 +218,16 @@ filesystem.path("/MineOS/Pictures/Dick.pic")
|
||||
|
||||
### filesystem.**extension**(*string* path): *string* extension
|
||||
|
||||
Returns extension from given path:
|
||||
Returns extension from given path. Skips end slash if any:
|
||||
|
||||
```lua
|
||||
filesystem.extension("/MineOS/Pictures/Dick.pic")
|
||||
filesystem.extension("/MineOS/Pictures/Vagina.app/")
|
||||
```
|
||||
|
||||
```
|
||||
> .pic
|
||||
> .app
|
||||
```
|
||||
|
||||
### filesystem.**hideExtension**(*string* path): *string* path
|
||||
@@ -320,7 +324,7 @@ If file was open in `w` , `wb`, `a` or `ab` mode, it will have following methods
|
||||
|
||||
### handle:**write**(...): *boolean* success, *string* reason
|
||||
|
||||
Writes passed arguments to file. Returns `true` on success, `false` and `reason` message otherwise.
|
||||
Writes passed arguments to file. Returns `true` on success, `false` and `reason` message otherwise. Arguments may have `string`, `int` or `boolean` type.
|
||||
|
||||
### handle:**writeBytes**(...): *boolean* success, *string* reason
|
||||
|
||||
|
||||
Reference in New Issue
Block a user