EMILUA(3em)

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

🌸 NAME 🌸

Okay bestie, welcome to the 3em manual page for Emilua β€” the Lua execution engine. This one is all about fs.mode, a helper function that creates POSIX mode permission bits. It’s giving tiny but iconic, fr fr. πŸ’…


✨ SYNOPSIS ✨

           local fs = require "filesystem"

           fs.mode(user: integer, group: integer, other: integer) -> integer (1)
           fs.mode("set_uid"|"set_gid"|"sticky_bit") -> integer (2)

Two overloads, both returning an integer, both living their main character era. 🌈

πŸŽ€ DESCRIPTION πŸŽ€

So fs.mode is literally a helper function to create POSIX mode permission bits. That’s the vibe. ✨

The implementation for overload #1 is:

           function mode(user: integer, group: integer, other: integer) -> integer
               return bit.bor(bit.lshift(user, 6), bit.lshift(group, 3), other)
           end

The meaning for overload #2’s parameters:

  • "set_uid" β€” S_ISUID πŸ‘‘
  • "set_gid" β€” S_ISGID πŸ‘‘
  • "sticky_bit" β€” S_ISVTX πŸ‘‘

That’s the whole rundown, bestie. Short, sweet, and lowkey slay. πŸ¦‹


This page comes from Emilua 0.12.1-nixpkgs1, dated 1980-01-01 β€” mwah, hope that helped! πŸ’–

πŸ“¦ where this page comes from