From f66af01eece2627f8dbeb37426f4040107ca073a Mon Sep 17 00:00:00 2001 From: tomas Date: Fri, 29 Oct 2004 16:15:59 +0000 Subject: Acrescimo de exemplo. Acrescimo do logo. --- doc/us/luafilesystem.png | Bin 0 -> 8535 bytes doc/us/manual.html | 26 +++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 doc/us/luafilesystem.png (limited to 'doc') 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:

Example

+
+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 (".")
+
+

Contents

@@ -141,7 +165,7 @@ LuaFileSystem offers the following functions:
-$Id: manual.html,v 1.3 2004/10/27 18:01:42 tomas Exp $ +$Id: manual.html,v 1.4 2004/10/29 16:15:59 tomas Exp $ -- cgit v1.2.3-55-g6feb