Path to the file. ~ is expanded.
Optionalmode: stringThe open mode. Defaults to "r".
Optionalpermissions: numberPOSIX permission bits applied if the file is created, e.g. 0o600 (0 creates a file with no permissions). Defaults to 0o644 when omitted; any other non-integer value, including NaN, fails with EINVAL. The process umask is applied in either case.
An HSFile, or null on failure (see hs.fs.lastError).
Open a file, returning an
HSFileobject for reading and/or writing it."r""r+""w""w+""a""a+"xto awmode ("wx","w+x") to fail if the file already exists. Abis accepted andhs.fs.lastErrorinstead.close()when you are finished with it; any files still open are closed