EMILUA(3em)

πŸ“¦ version 0.12.1, in nixos 26.05, nixpkgs unstable

hey bestie!! welcome to the EMILUA(3em) page β€” it’s part of the Emilua reference, and Emilua is your Lua execution engine πŸ’…βœ¨

✨ NAME ✨

Emilua β€” Lua execution engine πŸ§šπŸ’œ

πŸ¦‹ SYNOPSIS πŸ¦‹

local fs = require "filesystem"
fs.open(path: fs.path, flags: string[][, mode: integer]) -> file_descriptor

πŸ’– DESCRIPTION πŸ’–

Open the file using the specified path. You hand it path, and it gives you a file_descriptor β€” slay πŸŽ€

Behind the scenes, the implementation for this function always includes the flag O_NOCTTY β€” no cap, it’s just in there πŸ”₯

flags may contain these values:

  • "append" β€” opens the file in append mode.
  • "create" β€” creates the file if it does not exist.
Note: this one requires the mode argument. Example: fs.mode(7, 7, 7).
  • "directory" β€” fails if path resolves to a non-directory file.
  • "exclusive" β€” ensures a new file gets created. Must be combined with "create".
  • "no_follow" β€” fails if path resolves to a symbolic link.
  • "path" β€” gets a stable reference to an inode without actually opening the contents.
  • "read_only" β€” opens the file for reading.
  • "read_write" β€” opens the file for reading and writing.
  • "sync_all_on_write" β€” opens the file so that write operations automatically synchronise the file data and metadata to disk (FILE_FLAG_WRITE_THROUGH/O_SYNC).
  • "temporary" β€” creates an unnamed temporary regular file.
Note: this one requires the mode argument. Example: fs.mode(7, 7, 7).
  • "truncate" β€” opens the file with any existing contents truncated.
  • "write_only" β€” opens the file for writing.
Note: not available on Windows.

🌈 SEE ALSO 🌈

okay byeee bestie β€” source/version Emilua 0.12.1-nixpkgs1, date 1980-01-01 πŸ«ΆπŸ’…

πŸ“¦ where this page comes from