Module ctr.fs

The fs module.

Usage:

    local fs = require("ctr.fs")

Functions

list (path) Lists a directory contents (unsorted).
exists (path) Check if a item (file or directory) exists.
getDirectory () Get the current working directory.
setDirectory (path) Set the current working directory.

Tables

lzlib The ctr.fs.lzlib module.


Functions

list (path)
Lists a directory contents (unsorted).

Parameters:

  • path string the directory we wants to list the content

Returns:

    table the item list. Each item is a table like: { name = "Item name.txt", isDirectory = false, size = 321 -- (integer) item size, in bytes }

Or

  1. nil if an error occurred
  2. string error message
exists (path)
Check if a item (file or directory) exists.

Parameters:

Returns:

    boolean true if it exists, false otherwise
getDirectory ()
Get the current working directory.

Returns:

    string the current working directory
setDirectory (path)
Set the current working directory.

Parameters:

  • path path of the new working directory

Returns:

    boolean true if success

Or

  1. boolean false if failed
  2. string error message

Tables

lzlib
The ctr.fs.lzlib module.

See also:

generated by LDoc 1.4.3 Last updated 2017-06-05 14:35:27