diff --git a/doc/us/luafilesystem.png b/doc/us/luafilesystem.png new file mode 100644 index 0000000..e1dd8c6 Binary files /dev/null and b/doc/us/luafilesystem.png differ diff --git a/doc/us/manual.html b/doc/us/manual.html index 733bd8a..ae20fcc 100644 --- a/doc/us/manual.html +++ b/doc/us/manual.html @@ -110,6 +110,30 @@ LuaFileSystem offers the following functions:
+require"lfs"
+
+function attrdir (path)
+ for file in lfs.dir(path) do
+ if file ~= "." and file ~= ".." then
+ local f = path..'/'..file
+ print ("\t "..f)
+ local attr = lfs.attributes (f)
+ assert (type(attr) == "table")
+ if attr.mode == "directory" then
+ attrdir (f)
+ else
+ for name, value in pairs(attr) do
+ print (name, value)
+ end
+ end
+ end
+ end
+end
+
+attrdir (".")
+
+