diff --git a/versions/doc-improvements/docs/api/fs/index.html b/versions/doc-improvements/docs/api/fs/index.html index a5f8004..74b8801 100644 --- a/versions/doc-improvements/docs/api/fs/index.html +++ b/versions/doc-improvements/docs/api/fs/index.html @@ -34,9 +34,12 @@ library offers more functions and will work on any operating system Hilbish does 2print(fs.join(hilbish.userDir.config, 'hilbish')) 3-- -> '/home/user/.config/hilbish' on Linux

fs.mkdir(name, recursive) -

Creates a new directory with the provided name.
With recursive, mkdir will create parent directories.
– This will create the directory foo, then create the directory bar in the
– foo directory. If recursive is false in this case, it will fail.
fs.mkdir(’./foo/bar’, true)

Parameters +

Creates a new directory with the provided name.
With recursive, mkdir will create parent directories.

Parameters

string name
Name of the directory

boolean recursive
Whether to create parent directories for the provided name

Example -

fs.readdir(path) -> table[string] +

1-- This will create the directory foo, then create the directory bar in the
+2-- foo directory. If recursive is false in this case, it will fail.
+3fs.mkdir('./foo/bar', true)
+

fs.readdir(path) -> table[string]

Returns a list of all files and directories in the provided path.

Parameters

string dir


fs.stat(path) -> {}

Returns the information about a given path.
The returned table contains the following values:
name (string) - Name of the path
size (number) - Size of the path in bytes
mode (string) - Unix permission mode in an octal format string (with leading 0)
isDir (boolean) - If the path is a directory

Parameters