diff options
| author | tuler <tuler> | 2005-05-04 02:28:51 +0000 |
|---|---|---|
| committer | tuler <tuler> | 2005-05-04 02:28:51 +0000 |
| commit | 13cfce219176cfd6bea6f1089fc4e359b427810e (patch) | |
| tree | 406ee8d5ad9e3025b7a63c230b7c2fc562af8be2 /doc/us/examples.html | |
| parent | bf9b039d9c0b451df3b8628906e51f013f595dbb (diff) | |
| download | luafilesystem-13cfce219176cfd6bea6f1089fc4e359b427810e.tar.gz luafilesystem-13cfce219176cfd6bea6f1089fc4e359b427810e.tar.bz2 luafilesystem-13cfce219176cfd6bea6f1089fc4e359b427810e.zip | |
new documentation format
Diffstat (limited to 'doc/us/examples.html')
| -rw-r--r-- | doc/us/examples.html | 91 |
1 files changed, 91 insertions, 0 deletions
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 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 3 | <html> | ||
| 4 | <head> | ||
| 5 | <title>LuaFileSystem</title> | ||
| 6 | <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/> | ||
| 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
| 8 | </head> | ||
| 9 | |||
| 10 | <body> | ||
| 11 | |||
| 12 | <div id="container"> | ||
| 13 | |||
| 14 | <div id="product"> | ||
| 15 | <div id="product_logo"><a href="http://www.keplerproject.org"> | ||
| 16 | <img alt="LuaFileSystem" src="luafilesystem.png"/> | ||
| 17 | </a></div> | ||
| 18 | <div id="product_name"><big><b>LuaFileSystem</b></big></div> | ||
| 19 | <div id="product_description">File System Library for the Lua Programming Language</div> | ||
| 20 | </div> <!-- id="product" --> | ||
| 21 | |||
| 22 | <div id="main"> | ||
| 23 | |||
| 24 | <div id="navigation"> | ||
| 25 | <h1>LuaFileSystem</h1> | ||
| 26 | <ul> | ||
| 27 | <li><a href="index.html">Home</a> | ||
| 28 | <ul> | ||
| 29 | <li><a href="index.html#overview">Overview</a></li> | ||
| 30 | <li><a href="index.html#status">Status</a></li> | ||
| 31 | <li><a href="index.html#download">Download</a></li> | ||
| 32 | <li><a href="index.html#history">History</a></li> | ||
| 33 | <li><a href="index.html#credits">Credits</a></li> | ||
| 34 | <li><a href="index.html#contact">Contact us</a></li> | ||
| 35 | </ul> | ||
| 36 | </li> | ||
| 37 | <li><a href="manual.html">Manual</a> | ||
| 38 | <ul> | ||
| 39 | <li><a href="manual.html#introduction">Introduction</a></li> | ||
| 40 | <li><a href="manual.html#installation">Installation</a></li> | ||
| 41 | <li><a href="manual.html#reference">Reference</a></li> | ||
| 42 | </ul> | ||
| 43 | </li> | ||
| 44 | <li><strong>Examples</strong></li> | ||
| 45 | <li><a href="license.html">License</a></li> | ||
| 46 | </ul> | ||
| 47 | </div> <!-- id="navigation" --> | ||
| 48 | |||
| 49 | <div id="content"> | ||
| 50 | |||
| 51 | <h2><a name="example"></a>Example</h2> | ||
| 52 | |||
| 53 | <pre class="example"> | ||
| 54 | require"lfs" | ||
| 55 | |||
| 56 | function attrdir (path) | ||
| 57 | for file in lfs.dir(path) do | ||
| 58 | if file ~= "." and file ~= ".." then | ||
| 59 | local f = path..'/'..file | ||
| 60 | print ("\t "..f) | ||
| 61 | local attr = lfs.attributes (f) | ||
| 62 | assert (type(attr) == "table") | ||
| 63 | if attr.mode == "directory" then | ||
| 64 | attrdir (f) | ||
| 65 | else | ||
| 66 | for name, value in pairs(attr) do | ||
| 67 | print (name, value) | ||
| 68 | end | ||
| 69 | end | ||
| 70 | end | ||
| 71 | end | ||
| 72 | end | ||
| 73 | |||
| 74 | attrdir (".") | ||
| 75 | </pre> | ||
| 76 | |||
| 77 | </div> <!-- id="content" --> | ||
| 78 | |||
| 79 | </div> <!-- id="main" --> | ||
| 80 | |||
| 81 | <div id="about"> | ||
| 82 | <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p> | ||
| 83 | <p><small> | ||
| 84 | $Id: examples.html,v 1.1 2005/05/04 02:28:51 tuler Exp $ | ||
| 85 | </small></p> | ||
| 86 | </div> <!-- id="about" --> | ||
| 87 | |||
| 88 | </div> <!-- id="container" --> | ||
| 89 | |||
| 90 | </body> | ||
| 91 | </html> | ||
