luaposix 36.2.1 Reference

# Module `posix.libgen`

General Library.

Functions for separating a pathname into file and directory components.

## Functions

basename (path) | File part of path.
dirname (path) | Directory name of path.

## Functions

basename (path)
  File part of path.

  ### Parameters:

  - path string file to act on

  ### Returns:

  string filename part of path, if successful

  ### Or

  1. nil
  2. string error message
  3. int errnum

  ### See also:

  basename(3)
dirname (path)
  Directory name of path.

  ### Parameters:

  - path string file to act on

  ### Returns:

  string directory part of path, if successful

  ### Or

  1. nil
  2. string error message
  3. int errnum

  ### See also:

  dirname(3)

generated by LDoc 1.5.0 Last updated 2023-06-16 20:19:12