EMILUA(3em)
πΈ 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
- nixos 26.05: emilua 0.12.1
- nixpkgs unstable: emilua 0.12.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms