path string manipulation
luarocks install --from=http://mah0x211.github.io/rocks/ path
returns a normalized path string.
Parameters
- path: path components.
Returns
- path: normalized absolute path string.
return a directory portion of path string.
Parameters
- path: path string.
Returns
- path: directory portion of path string.
- errstr: dependent on a system.
return a filename or directory portion of path string.
Parameters
- path: path string.
Returns
- path: filename or directory portion of path string.
- errstr: dependent on a system.
return a extension of the path string.
Parameters
- path: path string.
Returns
- path: extension of the path string.
returns the canonicalized absolute pathname.
Parameters
- path: path string.
Returns
- path: returns the canonicalized absolute pathname or nil on error or not exists.
- errstr: dependent on a system.
return a information about the file pointed to by specified path.
Parameters
- path: path string.
- followSymlink: follow symbolic links (default: true).
- openfd: open a file descriptor (default: false).
Returns
- info: info table (same as struct stat without st_ prefix), nil on error or not exists.
- errstr: dependent on a system.
returns the absolute path if it is regular file.
Parameters
- path: path string.
Returns
- path: absolute path string or nil on error or not exists.
- errstr: dependent on a system.
returns the absolute path if it is directory.
Parameters
- path: path string.
Returns
- path: absolute path string or nil on error or not exists.
- errstr: dependent on a system.
returns a true if it is regular file.
returns a true if it is directory.
returns a true if it is character device.
returns a true if it is block device.
returns a true if it is FIFO special file, or a pipe.
returns a true if it is symbolic link.
returns a true if it is socket.
return entries of specified directory path.
Parameters
- path: directory path string.
Returns
- entries: entries table, nil on error or not exists.
- errstr: dependent on a system.