GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

✨ GOLF(2gg) ✨

okay bestie, welcome to the GOLF manual, section 2gg, filed under Development πŸ’– pull up a chair, we're doing permission bits today and honestly? it's giving main character energy.


πŸŽ€ NAME πŸŽ€

change-mode β€” (directories files)


🌸 PURPOSE 🌸

Change permission mode for a file or directory. that's it, that's the whole job, and she does it flawlessly πŸ’…


πŸ¦‹ SYNTAX πŸ¦‹

change-mode <file-or-directory> mode <mode> [ status <status> ]

✨ DESCRIPTION ✨

so here's the tea πŸ“ β€” change-mode will change permission mode for <file-or-directory> to <mode> as specified in the mode clause.

<mode> is a number, typically specified as octal (such as for instance 0750), see permissions. iykyk, octal is the moment πŸ‘‘

<file-or-directory> is a string that may be an absolute or relative path. flexible queen, we love to see it 🌈

If the status clause is used, then number <status> is:

  • GG_OKAY β€” if it succeeded πŸŽ‰
  • GG_ERR_EXIST β€” if file or directory does not exist 😭
  • GG_ERR_FAILED β€” for other errors

and if you get that last one? no cap, you can use the errno clause in get-req to find the specific reason why πŸ” (that's your detective era, go off)


πŸ’œ EXAMPLES πŸ’œ

To give read and write privilege to user's group members ("6" means that as a second digit) β€” not me explaining digit math in the year of our lord, but here we are:

change-mode "myfile" mode 0760

slay. that's it. that's the example. periodt πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

🌸 Directories

change-dir change-mode delete-dir directories new-dir

🌸 Files

change-mode close-file copy-file delete-file file-position file-storage file-uploading lock-file open-file read-file read-line rename-file stat-file temporary-file uniq-file unlock-file write-file

See all documentation 🫢


and that's the whole page, bestie!! this was GOLF(2gg), version $VERSION, dated $DATE β€” go forth and chmod responsibly, mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from