From 03e01ff9538a54be9f6b9ad85b5c95ddcc404c4c Mon Sep 17 00:00:00 2001
From: Peter Melnichenko
lfs.attributes (filepath [, aname])
lfs.attributes (filepath [, aname | atable])
filepath
(or nil
followed by an error message
in case of error).
- If the second optional argument is given, then only the value of the
+ If the second optional argument is given and is a string, then only the value of the
named attribute is returned (this use is equivalent to
- lfs.attributes(filepath).aname
, but the table is not created
+ lfs.attributes(filepath)[aname]
, but the table is not created
and only one attribute is retrieved from the O.S.).
+ if a table is passed as the second argument, it is filled with attributes and returned instead of a new table.
The attributes are described as follows;
attribute mode
is a string, all the others are numbers,
and the time related attributes use the same time reference of
diff --git a/src/lfs.c b/src/lfs.c
index d6b55df..a35413d 100644
--- a/src/lfs.c
+++ b/src/lfs.c
@@ -4,7 +4,7 @@
**
** File system manipulation library.
** This library offers these functions:
-** lfs.attributes (filepath [, attributename])
+** lfs.attributes (filepath [, attributename | attributetable])
** lfs.chdir (path)
** lfs.currentdir ()
** lfs.dir (path)
--
cgit v1.2.3-55-g6feb