From d597da4ebdf2f36c3d44b6438bfbde7eb64ea5df Mon Sep 17 00:00:00 2001 From: IgorTimofeev Date: Tue, 22 Jan 2019 15:56:23 +0300 Subject: [PATCH] Updated Filesystem API (markdown) --- Filesystem-API.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Filesystem-API.md b/Filesystem-API.md index e85fdd6..1758964 100644 --- a/Filesystem-API.md +++ b/Filesystem-API.md @@ -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