diff options
Diffstat (limited to 'doc/us/manual.html')
-rw-r--r-- | doc/us/manual.html | 178 |
1 files changed, 76 insertions, 102 deletions
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 | |||