From 13cfce219176cfd6bea6f1089fc4e359b427810e Mon Sep 17 00:00:00 2001 From: tuler Date: Wed, 4 May 2005 02:28:51 +0000 Subject: new documentation format --- doc/us/examples.html | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 doc/us/examples.html (limited to 'doc/us/examples.html') diff --git a/doc/us/examples.html b/doc/us/examples.html new file mode 100644 index 0000000..63a3f93 --- /dev/null +++ b/doc/us/examples.html @@ -0,0 +1,91 @@ + + + + LuaFileSystem + + + + + + +
+ +
+ +
LuaFileSystem
+
File System Library for the Lua Programming Language
+
+ +
+ + + +
+ +

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

Valid XHTML 1.0!

+

+ $Id: examples.html,v 1.1 2005/05/04 02:28:51 tuler Exp $ +

+
+ +
+ + + -- cgit v1.2.3-55-g6feb