Nar.owner.exec: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/sha/nar.bend as Nar Lines 278-288 of ezx@1.11.0.0/src/sha/nar.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/sha/nar.bend&start_line=278&end_line=288 import Base # whether a file's owner may execute it, from the mode `find` prints as # `%M`, `-rwxr-xr-x`: the fourth character is `x`, or `s` when the setuid # bit is set as well. This is the mode bit nix's NAR dumper reads # (`S_IXUSR`), not an access check, so a file the owner may not execute is # not executable whoever weighs it. def owner.exec(mode: String) -> Bool: match mode: case SCon{_t, SCon{_r, SCon{_w, SCon{+x, _rest}}}}: Bool.or(Char.is_eq(x, 'x'), Char.is_eq(x, 's')) case _: False{} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String