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 | |
| parent | bf9b039d9c0b451df3b8628906e51f013f595dbb (diff) | |
| download | luafilesystem-13cfce219176cfd6bea6f1089fc4e359b427810e.tar.gz luafilesystem-13cfce219176cfd6bea6f1089fc4e359b427810e.tar.bz2 luafilesystem-13cfce219176cfd6bea6f1089fc4e359b427810e.zip | |
new documentation format
| -rw-r--r-- | doc/us/examples.html | 91 | ||||
| -rw-r--r-- | doc/us/index.html | 164 | ||||
| -rw-r--r-- | doc/us/license.html | 77 | ||||
| -rw-r--r-- | doc/us/manual.html | 178 |
4 files changed, 306 insertions, 204 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> | ||
diff --git a/doc/us/index.html b/doc/us/index.html index 90c15ee..b7e6983 100644 --- a/doc/us/index.html +++ b/doc/us/index.html | |||
| @@ -1,76 +1,78 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html> | 3 | <html> |
| 3 | <head> | 4 | <head> |
| 4 | <meta name="generator" content="HTML Tidy, see www.w3.org"> | 5 | <title>LuaFileSystem</title> |
| 5 | <title>LuaFileSystem</title> | 6 | <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/> |
| 6 | <style type="text/css"> | 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 7 | ul { list-style-type: disc }; | ||
| 8 | </style> | ||
| 9 | </head> | 8 | </head> |
| 10 | <body bgcolor="#FFFFFF"> | 9 | <body> |
| 11 | <center> | 10 | |
| 12 | <table border="0" cellspacing="2" cellpadding="2"> | 11 | <div id="container"> |
| 13 | <tr> | 12 | |
| 14 | <td align="center"><a href="http://www.keplerproject.org"><img | 13 | <div id="product"> |
| 15 | border="0" alt="LuaFileSystem" src="luafilesystem.png"></a> </td> | 14 | <div id="product_logo"><a href="http://www.keplerproject.org"> |
| 16 | </tr> | 15 | <img alt="LuaFileSystem" src="luafilesystem.png"/> |
| 17 | 16 | </a></div> | |
| 18 | <tr> | 17 | <div id="product_name"><big><b>LuaFileSystem</b></big></div> |
| 19 | <td align="center"><big><b>LuaFileSystem</b></big> </td> | 18 | <div id="product_description">File System Library for the Lua Programming Language</div> |
| 20 | </tr> | 19 | </div> <!-- id="product" --> |
| 21 | 20 | ||
| 22 | <tr> | 21 | <div id="main"> |
| 23 | <td align="center" valign="top">File System Library for the <a | 22 | |
| 24 | href="http://www.lua.org">Lua</a> Programming Language</td> | 23 | <div id="navigation"> |
| 25 | </tr> | 24 | <h1>LuaFileSystem</h1> |
| 26 | </table> | 25 | <ul> |
| 27 | </center> | 26 | <li><strong>Home</strong> |
| 28 | 27 | <ul> | |
| 29 | <center><small> | 28 | <li><a href="index.html#overview">Overview</a></li> |
| 30 | <a href="#over">overview</a> · | 29 | <li><a href="index.html#status">Status</a></li> |
| 31 | <a href="#download">download</a> · | 30 | <li><a href="index.html#download">Download</a></li> |
| 32 | <a href="manual.html">manual</a> · | 31 | <li><a href="index.html#history">History</a></li> |
| 33 | <a href="#credits">credits</a> · | 32 | <li><a href="index.html#credits">Credits</a></li> |
| 34 | <a href="#contact">contact us</a> | 33 | <li><a href="index.html#contact">Contact us</a></li> |
| 35 | </small></center> | 34 | </ul> |
| 36 | 35 | </li> | |
| 37 | <hr> | 36 | <li><a href="manual.html">Manual</a> |
| 38 | <h2>Contents</h2> | 37 | <ul> |
| 39 | 38 | <li><a href="manual.html#introduction">Introduction</a></li> | |
| 40 | <ul> | 39 | <li><a href="manual.html#installation">Installation</a></li> |
| 41 | <li><a href="#over">Overview</a></li> | 40 | <li><a href="manual.html#reference">Reference</a></li> |
| 42 | <li><a href="#version">Current Version</a></li> | 41 | </ul> |
| 43 | <li><a href="#download">Download</a></li> | 42 | </li> |
| 44 | <li><a href="#manual">Manual</a></li> | 43 | <li><a href="examples.html">Examples</a></li> |
| 45 | <li><a href="#credits">Credits</a></li> | 44 | <li><a href="license.html">License</a></li> |
| 46 | <li><a href="#contact">Contact us</a></li> | 45 | </ul> |
| 47 | </ul> | 46 | </div> <!-- id="navigation" --> |
| 48 | 47 | ||
| 49 | <a name="over"></a> | 48 | <div id="content"> |
| 50 | <h2>Overview</h2> | 49 | |
| 51 | 50 | <h2><a name="overview"></a>Overview</h2> | |
| 52 | <p>LuaFileSystem is a library developed to complement the set of | 51 | <p> |
| 52 | LuaFileSystem is a library developed to complement the set of | ||
| 53 | functions related to file systems offered by the standard Lua | 53 | functions related to file systems offered by the standard Lua |
| 54 | distribution. One of its goals is to be as portable as Lua.</p> | 54 | distribution. One of its goals is to be as portable as Lua. |
| 55 | </p> | ||
| 55 | 56 | ||
| 56 | <p>LuaFileSystem is free software and uses the same <a href= | 57 | <p> |
| 57 | "license.html">license</a> as Lua 5.0. | 58 | LuaFileSystem is free software and uses the same <a href="license.html">license</a> as Lua 5.0. |
| 58 | </p> | 59 | </p> |
| 59 | 60 | ||
| 60 | <a name="version"></a> | 61 | <h2><a name="status"></a>Status</h2> |
| 61 | <h2>Current version</h2> | ||
| 62 | 62 | ||
| 63 | <p>Current version is 1.1. | 63 | <p> |
| 64 | It was developed for Lua 5.0.</p> | 64 | Current version is 1.1. It was developed for Lua 5.0. |
| 65 | </p> | ||
| 65 | 66 | ||
| 66 | <p>Version 1.1 follows the | 67 | <p> |
| 68 | Version 1.1 follows the | ||
| 67 | <a href="http://www.keplerproject.org/compat">package proposal</a> | 69 | <a href="http://www.keplerproject.org/compat">package proposal</a> |
| 68 | for Lua 5.1 (see section <a href="#installation">Installation</a> | 70 | for Lua 5.1 (see section <a href="manual.html#installation">Installation</a> |
| 69 | for more details). | 71 | for more details). |
| 70 | </p> | 72 | </p> |
| 71 | 73 | ||
| 72 | <a name="download"></a> | 74 | |
| 73 | <h2>Download</h2> | 75 | <h2><a name="download"></a>Download</h2> |
| 74 | 76 | ||
| 75 | <p> | 77 | <p> |
| 76 | LuaFileSystem can be downloaded from its | 78 | LuaFileSystem can be downloaded from its |
| @@ -78,8 +80,7 @@ LuaFileSystem can be downloaded from its | |||
| 78 | page. | 80 | page. |
| 79 | </p> | 81 | </p> |
| 80 | 82 | ||
| 81 | <a name="new"></a> | 83 | <h2><a name="history"></a>History</h2> |
| 82 | <h2>What's new</h2> | ||
| 83 | 84 | ||
| 84 | <ul> | 85 | <ul> |
| 85 | <li>[?/?/2005] Version 1.1 released</li> | 86 | <li>[?/?/2005] Version 1.1 released</li> |
| @@ -89,40 +90,31 @@ page. | |||
| 89 | 90 | ||
| 90 | Version 1.1 adds function <tt>lfs.touch</tt>. | 91 | Version 1.1 adds function <tt>lfs.touch</tt>. |
| 91 | 92 | ||
| 92 | <a name="installation"></a> | 93 | <h2><a name="credits"></a>Credits</h2> |
| 93 | <h2>Installation</h2> | ||
| 94 | |||
| 95 | <p>LuaFileSystem is distributed as a pair of C source and header | ||
| 96 | files. The distribution provides a <tt>Makefile</tt> prepared to | ||
| 97 | compile the library and install it. The file <tt>config</tt> should | ||
| 98 | be edited to suit the needs of the aimed platform.</p> | ||
| 99 | |||
| 100 | <p>LuaFileSystem follows the | ||
| 101 | <a href="http://www.keplerproject.org/compat">package proposal</a> | ||
| 102 | for Lua 5.1, therefore this package should be "installed". | ||
| 103 | In other words, | ||
| 104 | if you are using Lua 5.0, the files <tt>compat-5.1.c</tt> and | ||
| 105 | <tt>compat-5.1.h</tt> must be used in the compilation and the file | ||
| 106 | <tt>compat-5.1.lua</tt> must be installed in the <tt>LUA_PATH</tt>. | ||
| 107 | If you are using Lua 5.1, nothing should be done.</p> | ||
| 108 | |||
| 109 | <a name="credits"></a> | ||
| 110 | <h2>Credits</h2> | ||
| 111 | 94 | ||
| 112 | <p>LuaFileSystem was designed by Roberto Ierusalimschy, | 95 | <p>LuaFileSystem was designed by Roberto Ierusalimschy, |
| 113 | André Carregal and Tomás Guisasola as part of the | 96 | André Carregal and Tomás Guisasola as part of the |
| 114 | <a href="http://www.keplerproject.org">Kepler Project</a> | 97 | <a href="http://www.keplerproject.org">Kepler Project</a> |
| 115 | which holds its copyright.</p> | 98 | which holds its copyright.</p> |
| 116 | 99 | ||
| 117 | <a name="contact"></a> | 100 | <h2><a name="contact"></a>Contact us</h2> |
| 118 | <h2>Contact us</h2> | ||
| 119 | 101 | ||
| 120 | <p>For more information please <a href= | 102 | <p>For more information please <a href= |
| 121 | "mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us</a>. | 103 | "mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us</a>. |
| 122 | Comments are welcome!</p> | 104 | Comments are welcome!</p> |
| 123 | 105 | ||
| 124 | <hr> | 106 | </div> <!-- id="content" --> |
| 125 | <small>$Id: index.html,v 1.10 2005/01/24 10:59:58 tomas Exp $</small> | 107 | |
| 108 | </div> <!-- id="main" --> | ||
| 109 | |||
| 110 | <div id="about"> | ||
| 111 | <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> | ||
| 112 | <p><small> | ||
| 113 | $Id: index.html,v 1.11 2005/05/04 02:28:51 tuler Exp $ | ||
| 114 | </small></p> | ||
| 115 | </div> <!-- id="about" --> | ||
| 116 | |||
| 117 | </div> <!-- id="container" --> | ||
| 118 | |||
| 126 | </body> | 119 | </body> |
| 127 | </html> | 120 | </html> |
| 128 | |||
diff --git a/doc/us/license.html b/doc/us/license.html index 85a9df1..b889815 100644 --- a/doc/us/license.html +++ b/doc/us/license.html | |||
| @@ -1,13 +1,55 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html> | 3 | <html> |
| 3 | <head> | 4 | <head> |
| 4 | <meta name="generator" content="HTML Tidy, see www.w3.org"> | 5 | <title>LuaFileSystem</title> |
| 5 | <title>LuaFileSystem: license</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"/> | ||
| 6 | </head> | 8 | </head> |
| 7 | <body bgcolor="#FFFFFF"> | 9 | <body> |
| 8 | <hr> | 10 | |
| 11 | <div id="container"> | ||
| 12 | |||
| 13 | <div id="product"> | ||
| 14 | <div id="product_logo"><a href="http://www.keplerproject.org"> | ||
| 15 | <img alt="LuaFileSystem" src="luafilesystem.png"/> | ||
| 16 | </a></div> | ||
| 17 | <div id="product_name"><big><b>LuaFileSystem</b></big></div> | ||
| 18 | <div id="product_description">File System Library for the Lua Programming Language</div> | ||
| 19 | </div> <!-- id="product" --> | ||
| 20 | |||
| 21 | <div id="main"> | ||
| 22 | |||
| 23 | <div id="navigation"> | ||
| 24 | <h1>LuaFileSystem</h1> | ||
| 25 | <ul> | ||
| 26 | <li><a href="index.html">Home</a> | ||
| 27 | <ul> | ||
| 28 | <li><a href="index.html#overview">Overview</a></li> | ||
| 29 | <li><a href="index.html#status">Status</a></li> | ||
| 30 | <li><a href="index.html#download">Download</a></li> | ||
| 31 | <li><a href="index.html#history">History</a></li> | ||
| 32 | <li><a href="index.html#credits">Credits</a></li> | ||
| 33 | <li><a href="index.html#contact">Contact us</a></li> | ||
| 34 | </ul> | ||
| 35 | </li> | ||
| 36 | <li><a href="manual.html">Manual</a> | ||
| 37 | <ul> | ||
| 38 | <li><a href="manual.html#introduction">Introduction</a></li> | ||
| 39 | <li><a href="manual.html#installation">Installation</a></li> | ||
| 40 | <li><a href="manual.html#reference">Reference</a></li> | ||
| 41 | </ul> | ||
| 42 | </li> | ||
| 43 | <li><a href="examples.html">Examples</a></li> | ||
| 44 | <li><strong>License</strong></li> | ||
| 45 | </ul> | ||
| 46 | </div> <!-- id="navigation" --> | ||
| 47 | |||
| 48 | <div id="content"> | ||
| 49 | |||
| 9 | <h1>License</h1> | 50 | <h1>License</h1> |
| 10 | 51 | ||
| 52 | <p> | ||
| 11 | LuaFileSystem is free software: it can be used for both academic | 53 | LuaFileSystem is free software: it can be used for both academic |
| 12 | and commercial purposes at absolutely no cost. There are no | 54 | and commercial purposes at absolutely no cost. There are no |
| 13 | royalties or GNU-like "copyleft" restrictions. LuaFileSystem | 55 | royalties or GNU-like "copyleft" restrictions. LuaFileSystem |
| @@ -20,6 +62,7 @@ LuaFileSystem is not in the public domain and the | |||
| 20 | <a href="http://www.keplerproject.org">Kepler Project</a> | 62 | <a href="http://www.keplerproject.org">Kepler Project</a> |
| 21 | keep its copyright. | 63 | keep its copyright. |
| 22 | The legal details are below. | 64 | The legal details are below. |
| 65 | </p> | ||
| 23 | 66 | ||
| 24 | <p>The spirit of the license is that you are free to use | 67 | <p>The spirit of the license is that you are free to use |
| 25 | LuaFileSystem for any purpose at no cost without having to ask us. | 68 | LuaFileSystem for any purpose at no cost without having to ask us. |
| @@ -31,12 +74,8 @@ somewhere in your product or its documentation.</p> | |||
| 31 | Ierusalimschy, André Carregal and Tomás Guisasola. | 74 | Ierusalimschy, André Carregal and Tomás Guisasola. |
| 32 | The implementation is not derived from licensed software.</p> | 75 | The implementation is not derived from licensed software.</p> |
| 33 | 76 | ||
| 34 | <p> | ||
| 35 | <!-- ===================================================================== --> | ||
| 36 | </p> | ||
| 37 | |||
| 38 | <hr> | 77 | <hr> |
| 39 | Copyright © 2004-2005 The Kepler Project. | 78 | <p>Copyright © 2004-2005 The Kepler Project.</p> |
| 40 | 79 | ||
| 41 | <p>Permission is hereby granted, free of charge, to any person | 80 | <p>Permission is hereby granted, free of charge, to any person |
| 42 | obtaining a copy of this software and associated documentation | 81 | obtaining a copy of this software and associated documentation |
| @@ -58,12 +97,18 @@ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |||
| 58 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | 97 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 59 | SOFTWARE.</p> | 98 | SOFTWARE.</p> |
| 60 | 99 | ||
| 61 | <p> | 100 | </div> <!-- id="content" --> |
| 62 | <!-- ===================================================================== --> | 101 | |
| 63 | </p> | 102 | </div> <!-- id="main" --> |
| 103 | |||
| 104 | <div id="about"> | ||
| 105 | <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> | ||
| 106 | <p><small> | ||
| 107 | $Id: license.html,v 1.5 2005/05/04 02:28:51 tuler Exp $ | ||
| 108 | </small></p> | ||
| 109 | </div><!-- id="about" --> | ||
| 110 | |||
| 111 | </div><!-- id="container" --> | ||
| 64 | 112 | ||
| 65 | <hr> | ||
| 66 | <small>$Id: license.html,v 1.4 2005/01/19 14:30:08 tomas Exp $</small> | ||
| 67 | </body> | 113 | </body> |
| 68 | </html> | 114 | </html> |
| 69 | |||
diff --git a/doc/us/manual.html b/doc/us/manual.html index 26a2192..770b913 100644 --- a/doc/us/manual.html +++ b/doc/us/manual.html | |||
| @@ -1,43 +1,54 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html> | 3 | <html> |
| 3 | <head> | 4 | <head> |
| 4 | <meta name="generator" content="HTML Tidy, see www.w3.org"> | 5 | <title>LuaFileSystem</title> |
| 5 | <title>LuaFileSystem</title> | 6 | <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/> |
| 6 | <style type="text/css"> | 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 7 | ul { list-style-type: disc }; | ||
| 8 | </style> | ||
| 9 | </head> | 8 | </head> |
| 10 | <body bgcolor="#FFFFFF"> | 9 | |
| 11 | <hr> | 10 | <body> |
| 12 | <center> | 11 | |
| 13 | <table border="0" cellspacing="2" cellpadding="2"> | 12 | <div id="container"> |
| 14 | <tr> | 13 | |
| 15 | <td align="center"><a href= | 14 | <div id="product"> |
| 16 | "http://www.keplerproject.org/luafilesystem"><img border="0" alt= | 15 | <div id="product_logo"><a href="http://www.keplerproject.org"> |
| 17 | "LuaFileSystem logo" src="luafilesystem.png"></a> </td> | 16 | <img alt="LuaFileSystem" src="luafilesystem.png"/> |
| 18 | </tr> | 17 | </a></div> |
| 19 | 18 | <div id="product_name"><big><b>LuaFileSystem</b></big></div> | |
| 20 | <tr> | 19 | <div id="product_description">File System Library for the Lua Programming Language</div> |
| 21 | <td align="center"><big><b>LuaFileSystem Reference Manual</b></big> | 20 | </div> <!-- id="product" --> |
| 22 | </td> | 21 | |
| 23 | </tr> | 22 | <div id="main"> |
| 24 | 23 | ||
| 25 | <tr> | 24 | <div id="navigation"> |
| 26 | <td align="center" valign="top">File system library for the <a | 25 | <h1>LuaFileSystem</h1> |
| 27 | href="http://www.lua.org">Lua</a> programming language</td> | 26 | <ul> |
| 28 | </tr> | 27 | <li><a href="index.html">Home</a> |
| 29 | </table> | 28 | <ul> |
| 30 | </center> | 29 | <li><a href="index.html#overview">Overview</a></li> |
| 31 | 30 | <li><a href="index.html#status">Status</a></li> | |
| 32 | <center><small><a href="index.html">home</a> · <a href= | 31 | <li><a href="index.html#download">Download</a></li> |
| 33 | "#introduction">introduction</a> · <a href= | 32 | <li><a href="index.html#history">History</a></li> |
| 34 | "#reference">reference</a> · <a href= | 33 | <li><a href="index.html#credits">Credits</a></li> |
| 35 | "#example">example</a></small></center> | 34 | <li><a href="index.html#contact">Contact us</a></li> |
| 36 | 35 | </ul> | |
| 37 | <hr> | 36 | </li> |
| 38 | <a name="introduction"></a> | 37 | <li><strong>Manual</strong> |
| 39 | 38 | <ul> | |
| 40 | <h2>Introduction</h2> | 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><a href="examples.html">Examples</a></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="introduction"></a>Introduction</h2> | ||
| 41 | 52 | ||
| 42 | <p>LuaFileSystem is a <a href="http://www.lua.org">Lua</a> library | 53 | <p>LuaFileSystem is a <a href="http://www.lua.org">Lua</a> library |
| 43 | developed to complement the set of functions related to file | 54 | developed to complement the set of functions related to file |
| @@ -46,9 +57,26 @@ systems offered by the standard Lua distribution.</p> | |||
| 46 | <p>LuaFileSystem is free software and uses the same <a href= | 57 | <p>LuaFileSystem is free software and uses the same <a href= |
| 47 | "license.html">license</a> as Lua 5.0.</p> | 58 | "license.html">license</a> as Lua 5.0.</p> |
| 48 | 59 | ||
| 49 | <a name="reference"></a> | 60 | <h2><a name="installation"></a>Installation</h2> |
| 61 | |||
| 62 | <p> | ||
| 63 | LuaFileSystem is distributed as a pair of C source and header | ||
| 64 | files. The distribution provides a <tt>Makefile</tt> prepared to | ||
| 65 | compile the library and install it. The file <tt>config</tt> should | ||
| 66 | be edited to suit the needs of the aimed platform. | ||
| 67 | </p> | ||
| 68 | |||
| 69 | <p> | ||
| 70 | LuaFileSystem follows the | ||
| 71 | <a href="http://www.keplerproject.org/compat">package proposal</a> | ||
| 72 | for Lua 5.1, therefore this package should be "installed". | ||
| 73 | In other words, | ||
| 74 | if you are using Lua 5.0, the files <tt>compat-5.1.c</tt> and | ||
| 75 | <tt>compat-5.1.h</tt> must be used in the compilation and the file | ||
| 76 | <tt>compat-5.1.lua</tt> must be installed in the <tt>LUA_PATH</tt>. | ||
| 77 | If you are using Lua 5.1, nothing should be done.</p> | ||
| 50 | 78 | ||
| 51 | <h2>Reference</h2> | 79 | <h2><a name="reference"></a>Reference</h2> |
| 52 | 80 | ||
| 53 | <p>LuaFileSystem offers the following functions:</p> | 81 | <p>LuaFileSystem offers the following functions:</p> |
| 54 | 82 | ||
| @@ -147,72 +175,18 @@ case of error, it returns <code>false</code> plus a string | |||
| 147 | describing the error.</li> | 175 | describing the error.</li> |
| 148 | </ul> | 176 | </ul> |
| 149 | 177 | ||
| 150 | <a name="example"></a> | 178 | </div> <!-- id="content" --> |
| 151 | <h2>Example</h2> | ||
| 152 | |||
| 153 | <pre> | ||
| 154 | require"lfs" | ||
| 155 | |||
| 156 | function attrdir (path) | ||
| 157 | for file in lfs.dir(path) do | ||
| 158 | if file ~= "." and file ~= ".." then | ||
| 159 | local f = path..'/'..file | ||
| 160 | print ("\t "..f) | ||
| 161 | local attr = lfs.attributes (f) | ||
| 162 | assert (type(attr) == "table") | ||
| 163 | if attr.mode == "directory" then | ||
| 164 | attrdir (f) | ||
| 165 | else | ||
| 166 | for name, value in pairs(attr) do | ||
| 167 | print (name, value) | ||
| 168 | end | ||
| 169 | end | ||
| 170 | end | ||
| 171 | end | ||
| 172 | end | ||
| 173 | |||
| 174 | attrdir (".") | ||
| 175 | </pre> | ||
| 176 | |||
| 177 | <a name="contents"></a> | ||
| 178 | |||
| 179 | <h2>Contents</h2> | ||
| 180 | |||
| 181 | <ul> | ||
| 182 | <li><a href="#introduction">Introduction</a></li> | ||
| 183 | |||
| 184 | <li><a href="#reference">Reference</a> | ||
| 185 | |||
| 186 | <ul> | ||
| 187 | <li><a href="#chdir">chdir</a></li> | ||
| 188 | |||
| 189 | <li><a href="#currentdir">currentdir</a></li> | ||
| 190 | 179 | ||
| 191 | <li><a href="#dir">dir</a></li> | 180 | </div> <!-- id="main" --> |
| 192 | 181 | ||
| 193 | <li><a href="#lock">lock</a></li> | 182 | <div id="about"> |
| 183 | <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> | ||
| 184 | <p><small> | ||
| 185 | $Id: manual.html,v 1.10 2005/05/04 02:28:51 tuler Exp $ | ||
| 186 | </small></p> | ||
| 187 | </div> <!-- id="about" --> | ||
| 194 | 188 | ||
| 195 | <li><a href="#mkdir">mkdir</a></li> | 189 | </div> <!-- id="container" --> |
| 196 | 190 | ||
| 197 | <li><a href="#unlock">unlock</a></li> | ||
| 198 | </ul> | ||
| 199 | </li> | ||
| 200 | |||
| 201 | <li><a href="#examples">Examples</a></li> | ||
| 202 | </ul> | ||
| 203 | |||
| 204 | <br> | ||
| 205 | <br> | ||
| 206 | |||
| 207 | |||
| 208 | <center><small><a href="index.html">home</a> · <a href= | ||
| 209 | "#introduction">introduction</a> · <a href= | ||
| 210 | "#reference">reference</a> · <a href= | ||
| 211 | "#example">example</a></small></center> | ||
| 212 | |||
| 213 | <hr> | ||
| 214 | <small>$Id: manual.html,v 1.7 2004/11/10 14:09:45 tuler Exp | ||
| 215 | $</small> | ||
| 216 | </body> | 191 | </body> |
| 217 | </html> | 192 | </html> |
| 218 | |||
