We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I'm trying to improve a lfs alternative to follow the same API and get the same behavior.
About lfs.attributes()
lfs.attributes()
I see 3 different way to use it.
lfs.attributes(".")
table
lfs.attributes(".", "mode")
string
"directory"
lfs.attributes(".", {"mode", "foo", "blksize"})
I'm focused on the last case.
"foo"
I discovered one special use case...
local lfs = require "lfs" local request = {"mode", "foo", "blksize"} local result = lfs.attributes(".", request) for k,v in pairs(result) do print(k,v) end
1 mode 2 foo 3 blksize permissions rwx------ access 1513156646 modification 1513158553 blksize 4096 blocks 123 change 1513158553 size 12345 gid 1000 rdev 0 uid 1000 dev 12345 nlink 123 mode directory ino 123456
EDIT: I discovered I missread the documentation, the atable argument is not a list of wanted fields but the result table pointer.
atable
Should we rename the atable argument to resultTable ? and also add this name inside the text ? I will try to make a PR for this.
resultTable
The text was updated successfully, but these errors were encountered:
See #106
Sorry, something went wrong.
PR merged, thank you for contributing to making the documentation clearer!
No branches or pull requests
Hello,
I'm trying to improve a lfs alternative to follow the same API and get the same behavior.
About
lfs.attributes()
I see 3 different way to use it.
lfs.attributes(".")
returns atable
with all fieldslfs.attributes(".", "mode")
returns astring
:"directory"
lfs.attributes(".", {"mode", "foo", "blksize"})
returns atable
with only the requested fieldsI'm focused on the last case.
"foo"
), no error raised. it seems legit and ok.I discovered one special use case...
EDIT: I discovered I missread the documentation, the
atable
argument is not a list of wanted fields but the result table pointer.Should we rename the
atable
argument toresultTable
? and also add this name inside the text ?I will try to make a PR for this.
The text was updated successfully, but these errors were encountered: