Page MenuHomeFreeBSD

Provide chmod to flua
ClosedPublic

Authored by 2333_outlook.jp on Mar 11 2020, 10:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 1, 5:02 PM
Unknown Object (File)
Dec 15 2024, 5:06 AM
Unknown Object (File)
Dec 3 2024, 1:24 AM
Unknown Object (File)
Oct 16 2024, 1:39 AM
Unknown Object (File)
Sep 26 2024, 8:56 PM
Unknown Object (File)
Sep 18 2024, 7:09 AM
Unknown Object (File)
Sep 18 2024, 3:16 AM
Unknown Object (File)
Sep 17 2024, 9:39 PM
Subscribers

Details

Summary

Lua does not provide a native way to change the permission of a file. Adding this function will enable flua scripts to access and modify (by using a temp file with right permission, then overwritting) protected files.

usage: > require'posix.sys.stat'.chmod('hello.txt', 511)
0 -- example if success
nil No such file or directory 2 -- example if failure

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

2333_outlook.jp edited the summary of this revision. (Show Details)
2333_outlook.jp edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Mar 13 2020, 2:29 AM
This revision was automatically updated to reflect the committed changes.