Updated Filesystem API (markdown)

IgorTimofeev
2019-01-22 15:56:23 +03:00
parent 945deca4a5
commit d597da4ebd

@@ -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