lunarmodules / luafilesystem

LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution.
https://lunarmodules.github.io/luafilesystem/
MIT License
900 stars 291 forks source link

Implemented lfs.chown and lfs.chmod functions #166

Open lch361 opened 1 year ago

lch361 commented 1 year ago

As this library has a function to get file permissions, uid and gid, I think it is a good idea to have a way to set these as well.

hishamhm commented 9 months ago

Thanks for the PR, but this is intended primarily as a portable library. It does leak some Unix-specific info, but at least it does have a minimal implementation of lfs.attributes for Windows. I'm wary about adding new Unix-only functions to the library since that would start a slippery slope which could easily lead it to becoming another implementation of luaposix, which already exists.