Created
July 17, 2015 16:52
-
-
Save kaustavha/9143ca1f2ccbf20eef9a to your computer and use it in GitHub Desktop.
The lua(luvit) way of retrieving file permissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ data is returned from fs.stat call to desired file]]-- | |
octalFilePerm[file] = bit.band(data.mode, tonumber('777', 8)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment