Skip to content

Instantly share code, notes, and snippets.

@kaustavha
Created July 17, 2015 16:52
Show Gist options
  • Save kaustavha/9143ca1f2ccbf20eef9a to your computer and use it in GitHub Desktop.
Save kaustavha/9143ca1f2ccbf20eef9a to your computer and use it in GitHub Desktop.
The lua(luvit) way of retrieving file permissions
--[[ 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