new documentation format

This commit is contained in:
tuler
2005-05-04 02:28:51 +00:00
parent bf9b039d9c
commit 13cfce2191
4 changed files with 297 additions and 195 deletions

91
doc/us/examples.html Normal file
View File

@@ -0,0 +1,91 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>LuaFileSystem</title>
<link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"><a href="http://www.keplerproject.org">
<img alt="LuaFileSystem" src="luafilesystem.png"/>
</a></div>
<div id="product_name"><big><b>LuaFileSystem</b></big></div>
<div id="product_description">File System Library for the Lua Programming Language</div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaFileSystem</h1>
<ul>
<li><a href="index.html">Home</a>
<ul>
<li><a href="index.html#overview">Overview</a></li>
<li><a href="index.html#status">Status</a></li>
<li><a href="index.html#download">Download</a></li>
<li><a href="index.html#history">History</a></li>
<li><a href="index.html#credits">Credits</a></li>
<li><a href="index.html#contact">Contact us</a></li>
</ul>
</li>
<li><a href="manual.html">Manual</a>
<ul>
<li><a href="manual.html#introduction">Introduction</a></li>
<li><a href="manual.html#installation">Installation</a></li>
<li><a href="manual.html#reference">Reference</a></li>
</ul>
</li>
<li><strong>Examples</strong></li>
<li><a href="license.html">License</a></li>
</ul>
</div> <!-- id="navigation" -->
<div id="content">
<h2><a name="example"></a>Example</h2>
<pre class="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 (".")
</pre>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<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>
<p><small>
$Id: examples.html,v 1.1 2005/05/04 02:28:51 tuler Exp $
</small></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -1,76 +1,78 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <html>
<head> <head>
<meta name="generator" content="HTML Tidy, see www.w3.org"> <title>LuaFileSystem</title>
<title>LuaFileSystem</title> <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
<style type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
ul { list-style-type: disc };
</style>
</head> </head>
<body bgcolor="#FFFFFF"> <body>
<center>
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="center"><a href="http://www.keplerproject.org"><img
border="0" alt="LuaFileSystem" src="luafilesystem.png"></a> </td>
</tr>
<tr> <div id="container">
<td align="center"><big><b>LuaFileSystem</b></big> </td>
</tr>
<tr> <div id="product">
<td align="center" valign="top">File System Library for the <a <div id="product_logo"><a href="http://www.keplerproject.org">
href="http://www.lua.org">Lua</a> Programming Language</td> <img alt="LuaFileSystem" src="luafilesystem.png"/>
</tr> </a></div>
</table> <div id="product_name"><big><b>LuaFileSystem</b></big></div>
</center> <div id="product_description">File System Library for the Lua Programming Language</div>
</div> <!-- id="product" -->
<center><small> <div id="main">
<a href="#over">overview</a> &middot;
<a href="#download">download</a> &middot;
<a href="manual.html">manual</a> &middot;
<a href="#credits">credits</a> &middot;
<a href="#contact">contact us</a>
</small></center>
<hr> <div id="navigation">
<h2>Contents</h2> <h1>LuaFileSystem</h1>
<ul>
<li><strong>Home</strong>
<ul>
<li><a href="index.html#overview">Overview</a></li>
<li><a href="index.html#status">Status</a></li>
<li><a href="index.html#download">Download</a></li>
<li><a href="index.html#history">History</a></li>
<li><a href="index.html#credits">Credits</a></li>
<li><a href="index.html#contact">Contact us</a></li>
</ul>
</li>
<li><a href="manual.html">Manual</a>
<ul>
<li><a href="manual.html#introduction">Introduction</a></li>
<li><a href="manual.html#installation">Installation</a></li>
<li><a href="manual.html#reference">Reference</a></li>
</ul>
</li>
<li><a href="examples.html">Examples</a></li>
<li><a href="license.html">License</a></li>
</ul>
</div> <!-- id="navigation" -->
<ul> <div id="content">
<li><a href="#over">Overview</a></li>
<li><a href="#version">Current Version</a></li>
<li><a href="#download">Download</a></li>
<li><a href="#manual">Manual</a></li>
<li><a href="#credits">Credits</a></li>
<li><a href="#contact">Contact us</a></li>
</ul>
<a name="over"></a> <h2><a name="overview"></a>Overview</h2>
<h2>Overview</h2> <p>
LuaFileSystem is a library developed to complement the set of
<p>LuaFileSystem is a library developed to complement the set of
functions related to file systems offered by the standard Lua functions related to file systems offered by the standard Lua
distribution. One of its goals is to be as portable as Lua.</p> distribution. One of its goals is to be as portable as Lua.
<p>LuaFileSystem is free software and uses the same <a href=
"license.html">license</a> as Lua 5.0.
</p> </p>
<a name="version"></a> <p>
<h2>Current version</h2> LuaFileSystem is free software and uses the same <a href="license.html">license</a> as Lua 5.0.
</p>
<p>Current version is 1.1. <h2><a name="status"></a>Status</h2>
It was developed for Lua 5.0.</p>
<p>Version 1.1 follows the <p>
Current version is 1.1. It was developed for Lua 5.0.
</p>
<p>
Version 1.1 follows the
<a href="http://www.keplerproject.org/compat">package proposal</a> <a href="http://www.keplerproject.org/compat">package proposal</a>
for Lua 5.1 (see section <a href="#installation">Installation</a> for Lua 5.1 (see section <a href="manual.html#installation">Installation</a>
for more details). for more details).
</p> </p>
<a name="download"></a>
<h2>Download</h2> <h2><a name="download"></a>Download</h2>
<p> <p>
LuaFileSystem can be downloaded from its LuaFileSystem can be downloaded from its
@@ -78,8 +80,7 @@ LuaFileSystem can be downloaded from its
page. page.
</p> </p>
<a name="new"></a> <h2><a name="history"></a>History</h2>
<h2>What's new</h2>
<ul> <ul>
<li>[?/?/2005] Version 1.1 released</li> <li>[?/?/2005] Version 1.1 released</li>
@@ -89,40 +90,31 @@ page.
Version 1.1 adds function <tt>lfs.touch</tt>. Version 1.1 adds function <tt>lfs.touch</tt>.
<a name="installation"></a> <h2><a name="credits"></a>Credits</h2>
<h2>Installation</h2>
<p>LuaFileSystem is distributed as a pair of C source and header
files. The distribution provides a <tt>Makefile</tt> prepared to
compile the library and install it. The file <tt>config</tt> should
be edited to suit the needs of the aimed platform.</p>
<p>LuaFileSystem follows the
<a href="http://www.keplerproject.org/compat">package proposal</a>
for Lua 5.1, therefore this package should be "installed".
In other words,
if you are using Lua 5.0, the files <tt>compat-5.1.c</tt> and
<tt>compat-5.1.h</tt> must be used in the compilation and the file
<tt>compat-5.1.lua</tt> must be installed in the <tt>LUA_PATH</tt>.
If you are using Lua 5.1, nothing should be done.</p>
<a name="credits"></a>
<h2>Credits</h2>
<p>LuaFileSystem was designed by Roberto Ierusalimschy, <p>LuaFileSystem was designed by Roberto Ierusalimschy,
Andr&eacute; Carregal and Tom&aacute;s Guisasola as part of the Andr&eacute; Carregal and Tom&aacute;s Guisasola as part of the
<a href="http://www.keplerproject.org">Kepler Project</a> <a href="http://www.keplerproject.org">Kepler Project</a>
which holds its copyright.</p> which holds its copyright.</p>
<a name="contact"></a> <h2><a name="contact"></a>Contact us</h2>
<h2>Contact us</h2>
<p>For more information please <a href= <p>For more information please <a href=
"mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us</a>. "mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us</a>.
Comments are welcome!</p> Comments are welcome!</p>
<hr> </div> <!-- id="content" -->
<small>$Id: index.html,v 1.10 2005/01/24 10:59:58 tomas Exp $</small>
</div> <!-- id="main" -->
<div id="about">
<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>
<p><small>
$Id: index.html,v 1.11 2005/05/04 02:28:51 tuler Exp $
</small></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body> </body>
</html> </html>

View File

@@ -1,13 +1,55 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <html>
<head> <head>
<meta name="generator" content="HTML Tidy, see www.w3.org"> <title>LuaFileSystem</title>
<title>LuaFileSystem: license</title> <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head> </head>
<body bgcolor="#FFFFFF"> <body>
<hr>
<div id="container">
<div id="product">
<div id="product_logo"><a href="http://www.keplerproject.org">
<img alt="LuaFileSystem" src="luafilesystem.png"/>
</a></div>
<div id="product_name"><big><b>LuaFileSystem</b></big></div>
<div id="product_description">File System Library for the Lua Programming Language</div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaFileSystem</h1>
<ul>
<li><a href="index.html">Home</a>
<ul>
<li><a href="index.html#overview">Overview</a></li>
<li><a href="index.html#status">Status</a></li>
<li><a href="index.html#download">Download</a></li>
<li><a href="index.html#history">History</a></li>
<li><a href="index.html#credits">Credits</a></li>
<li><a href="index.html#contact">Contact us</a></li>
</ul>
</li>
<li><a href="manual.html">Manual</a>
<ul>
<li><a href="manual.html#introduction">Introduction</a></li>
<li><a href="manual.html#installation">Installation</a></li>
<li><a href="manual.html#reference">Reference</a></li>
</ul>
</li>
<li><a href="examples.html">Examples</a></li>
<li><strong>License</strong></li>
</ul>
</div> <!-- id="navigation" -->
<div id="content">
<h1>License</h1> <h1>License</h1>
<p>
LuaFileSystem is free software: it can be used for both academic LuaFileSystem is free software: it can be used for both academic
and commercial purposes at absolutely no cost. There are no and commercial purposes at absolutely no cost. There are no
royalties or GNU-like "copyleft" restrictions. LuaFileSystem royalties or GNU-like "copyleft" restrictions. LuaFileSystem
@@ -20,6 +62,7 @@ LuaFileSystem is not in the public domain and the
<a href="http://www.keplerproject.org">Kepler Project</a> <a href="http://www.keplerproject.org">Kepler Project</a>
keep its copyright. keep its copyright.
The legal details are below. The legal details are below.
</p>
<p>The spirit of the license is that you are free to use <p>The spirit of the license is that you are free to use
LuaFileSystem for any purpose at no cost without having to ask us. LuaFileSystem for any purpose at no cost without having to ask us.
@@ -31,12 +74,8 @@ somewhere in your product or its documentation.</p>
Ierusalimschy, Andr&eacute; Carregal and Tom&aacute;s Guisasola. Ierusalimschy, Andr&eacute; Carregal and Tom&aacute;s Guisasola.
The implementation is not derived from licensed software.</p> The implementation is not derived from licensed software.</p>
<p>
<!-- ===================================================================== -->
</p>
<hr> <hr>
Copyright &copy; 2004-2005 The Kepler Project. <p>Copyright &copy; 2004-2005 The Kepler Project.</p>
<p>Permission is hereby granted, free of charge, to any person <p>Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation 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
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.</p> SOFTWARE.</p>
<p> </div> <!-- id="content" -->
<!-- ===================================================================== -->
</p> </div> <!-- id="main" -->
<div id="about">
<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>
<p><small>
$Id: license.html,v 1.5 2005/05/04 02:28:51 tuler Exp $
</small></p>
</div><!-- id="about" -->
</div><!-- id="container" -->
<hr>
<small>$Id: license.html,v 1.4 2005/01/19 14:30:08 tomas Exp $</small>
</body> </body>
</html> </html>

View File

@@ -1,43 +1,54 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <html>
<head> <head>
<meta name="generator" content="HTML Tidy, see www.w3.org"> <title>LuaFileSystem</title>
<title>LuaFileSystem</title> <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
<style type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
ul { list-style-type: disc };
</style>
</head> </head>
<body bgcolor="#FFFFFF">
<hr>
<center>
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="center"><a href=
"http://www.keplerproject.org/luafilesystem"><img border="0" alt=
"LuaFileSystem logo" src="luafilesystem.png"></a> </td>
</tr>
<tr> <body>
<td align="center"><big><b>LuaFileSystem Reference Manual</b></big>
</td>
</tr>
<tr> <div id="container">
<td align="center" valign="top">File system library for the <a
href="http://www.lua.org">Lua</a> programming language</td>
</tr>
</table>
</center>
<center><small><a href="index.html">home</a> &middot; <a href= <div id="product">
"#introduction">introduction</a> &middot; <a href= <div id="product_logo"><a href="http://www.keplerproject.org">
"#reference">reference</a> &middot; <a href= <img alt="LuaFileSystem" src="luafilesystem.png"/>
"#example">example</a></small></center> </a></div>
<div id="product_name"><big><b>LuaFileSystem</b></big></div>
<div id="product_description">File System Library for the Lua Programming Language</div>
</div> <!-- id="product" -->
<hr> <div id="main">
<a name="introduction"></a>
<h2>Introduction</h2> <div id="navigation">
<h1>LuaFileSystem</h1>
<ul>
<li><a href="index.html">Home</a>
<ul>
<li><a href="index.html#overview">Overview</a></li>
<li><a href="index.html#status">Status</a></li>
<li><a href="index.html#download">Download</a></li>
<li><a href="index.html#history">History</a></li>
<li><a href="index.html#credits">Credits</a></li>
<li><a href="index.html#contact">Contact us</a></li>
</ul>
</li>
<li><strong>Manual</strong>
<ul>
<li><a href="manual.html#introduction">Introduction</a></li>
<li><a href="manual.html#installation">Installation</a></li>
<li><a href="manual.html#reference">Reference</a></li>
</ul>
</li>
<li><a href="examples.html">Examples</a></li>
<li><a href="license.html">License</a></li>
</ul>
</div> <!-- id="navigation" -->
<div id="content">
<h2><a name="introduction"></a>Introduction</h2>
<p>LuaFileSystem is a <a href="http://www.lua.org">Lua</a> library <p>LuaFileSystem is a <a href="http://www.lua.org">Lua</a> library
developed to complement the set of functions related to file developed to complement the set of functions related to file
@@ -46,9 +57,26 @@ systems offered by the standard Lua distribution.</p>
<p>LuaFileSystem is free software and uses the same <a href= <p>LuaFileSystem is free software and uses the same <a href=
"license.html">license</a> as Lua 5.0.</p> "license.html">license</a> as Lua 5.0.</p>
<a name="reference"></a> <h2><a name="installation"></a>Installation</h2>
<h2>Reference</h2> <p>
LuaFileSystem is distributed as a pair of C source and header
files. The distribution provides a <tt>Makefile</tt> prepared to
compile the library and install it. The file <tt>config</tt> should
be edited to suit the needs of the aimed platform.
</p>
<p>
LuaFileSystem follows the
<a href="http://www.keplerproject.org/compat">package proposal</a>
for Lua 5.1, therefore this package should be "installed".
In other words,
if you are using Lua 5.0, the files <tt>compat-5.1.c</tt> and
<tt>compat-5.1.h</tt> must be used in the compilation and the file
<tt>compat-5.1.lua</tt> must be installed in the <tt>LUA_PATH</tt>.
If you are using Lua 5.1, nothing should be done.</p>
<h2><a name="reference"></a>Reference</h2>
<p>LuaFileSystem offers the following functions:</p> <p>LuaFileSystem offers the following functions:</p>
@@ -147,72 +175,18 @@ case of error, it returns <code>false</code> plus a string
describing the error.</li> describing the error.</li>
</ul> </ul>
<a name="example"></a> </div> <!-- id="content" -->
<h2>Example</h2>
<pre> </div> <!-- id="main" -->
require"lfs"
function attrdir (path) <div id="about">
for file in lfs.dir(path) do <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>
if file ~= "." and file ~= ".." then <p><small>
local f = path..'/'..file $Id: manual.html,v 1.10 2005/05/04 02:28:51 tuler Exp $
print ("\t "..f) </small></p>
local attr = lfs.attributes (f) </div> <!-- id="about" -->
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 (".") </div> <!-- id="container" -->
</pre>
<a name="contents"></a>
<h2>Contents</h2>
<ul>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#reference">Reference</a>
<ul>
<li><a href="#chdir">chdir</a></li>
<li><a href="#currentdir">currentdir</a></li>
<li><a href="#dir">dir</a></li>
<li><a href="#lock">lock</a></li>
<li><a href="#mkdir">mkdir</a></li>
<li><a href="#unlock">unlock</a></li>
</ul>
</li>
<li><a href="#examples">Examples</a></li>
</ul>
<br>
<br>
<center><small><a href="index.html">home</a> &middot; <a href=
"#introduction">introduction</a> &middot; <a href=
"#reference">reference</a> &middot; <a href=
"#example">example</a></small></center>
<hr>
<small>$Id: manual.html,v 1.7 2004/11/10 14:09:45 tuler Exp
$</small>
</body> </body>
</html> </html>