Home  Contents

os.chdir

OS Core4 Lua Commands

SYNOPSIS

  1. path = os.cwd()
  2. os.chdir(path)

DESCRIPTION

os.chdir() changes the current working directory of the application to path.

os.cwd() returns the current working directory.

RETURN VALUE

os.chdir() returns true on success. On error, three values are returned: nil, a string describing the error (The result of the C library call strerror() on the errno code) and the errno number from the standard C library.

os.cwd() returns the current working directory as a string.

SEE ALSO