diff options
author | carregal <carregal> | 2004-11-22 17:39:39 +0000 |
---|---|---|
committer | carregal <carregal> | 2004-11-22 17:39:39 +0000 |
commit | 949d9dc86c2b6aa79a94f1331437daa5ede5ddb4 (patch) | |
tree | beb8f674a8dd828e7e7ae356a45a70c928fda017 /doc | |
parent | e354e5c568d71daa1c37c7e7c9955e9d325a4da3 (diff) | |
download | luafilesystem-949d9dc86c2b6aa79a94f1331437daa5ede5ddb4.tar.gz luafilesystem-949d9dc86c2b6aa79a94f1331437daa5ede5ddb4.tar.bz2 luafilesystem-949d9dc86c2b6aa79a94f1331437daa5ede5ddb4.zip |
HTML Tidying
Diffstat (limited to 'doc')
-rw-r--r-- | doc/us/index.html | 178 | ||||
-rw-r--r-- | doc/us/license.html | 124 | ||||
-rw-r--r-- | doc/us/manual.html | 267 |
3 files changed, 273 insertions, 296 deletions
diff --git a/doc/us/index.html b/doc/us/index.html index 4394051..eb95b1d 100644 --- a/doc/us/index.html +++ b/doc/us/index.html | |||
@@ -1,140 +1,122 @@ | |||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> | ||
1 | <html> | 2 | <html> |
2 | |||
3 | <head> | 3 | <head> |
4 | <meta name="generator" content="HTML Tidy, see www.w3.org"> | ||
4 | <title>LuaFileSystem</title> | 5 | <title>LuaFileSystem</title> |
5 | <style type="text/css"> | 6 | <style type="text/css"> |
6 | ul { list-style-type: disc }; | 7 | ul { list-style-type: disc }; |
7 | </style> | 8 | </style> |
8 | </head> | 9 | </head> |
9 | |||
10 | <body bgcolor="#FFFFFF"> | 10 | <body bgcolor="#FFFFFF"> |
11 | |||
12 | <center> | 11 | <center> |
13 | <table border=0 cellspacing=2 cellpadding=2> | 12 | <table border="0" cellspacing="2" cellpadding="2"> |
14 | <tr><td align=center><a href="http://www.keplerproject.org"> | 13 | <tr> |
15 | <img border=0 alt="LuaFileSystem" src="luafilesystem.png"></a> | 14 | <td align="center"><a href="http://www.keplerproject.org"><img |
16 | <tr><td align=center><big><b>LuaFileSystem</b></big> | 15 | border="0" alt="LuaFileSystem" src="luafilesystem.png"></a> </td> |
17 | <tr><td align=center valign=top>File System Library for the | 16 | </tr> |
18 | <a href="http://www.lua.org">Lua</a> | 17 | |
19 | Programming Language | 18 | <tr> |
19 | <td align="center"><big><b>LuaFileSystem</b></big> </td> | ||
20 | </tr> | ||
21 | |||
22 | <tr> | ||
23 | <td align="center" valign="top">File System Library for the <a | ||
24 | href="http://www.lua.org">Lua</a> Programming Language</td> | ||
25 | </tr> | ||
20 | </table> | 26 | </table> |
21 | </center> | 27 | </center> |
22 | <p> | ||
23 | 28 | ||
24 | <center><small> | 29 | <center><small><a href="#over">overview</a> · <a href= |
25 | <a href="#over">overview</a> · | 30 | "#download">download</a> · <a href="manual.html">manual</a> |
26 | <a href="#download">download</a> · | 31 | · <a href="#credits">credits</a> · <a href= |
27 | <a href="manual.html">manual</a> · | 32 | "#contact">contact us</a></small></center> |
28 | <a href="#credits">credits</a> · | ||
29 | <a href="#contact">contact us</a> | ||
30 | </small></center> | ||
31 | <p> | ||
32 | 33 | ||
33 | <hr> | 34 | <hr> |
34 | <h2>Contents</h2> | 35 | <h2>Contents</h2> |
35 | <p> | 36 | |
36 | <ul> | 37 | <ul> |
37 | <li> <a href="#over">Overview</a> | 38 | <li><a href="#over">Overview</a></li> |
38 | <li> <a href="#version">Current Version</a> | 39 | |
39 | <li> <a href="#download">Download</a> | 40 | <li><a href="#version">Current Version</a></li> |
40 | <li> <a href="#manual">Manual</a> | 41 | |
41 | <li> <a href="#credits">Credits</a> | 42 | <li><a href="#download">Download</a></li> |
42 | <li> <a href="#contact">Contact us</a> | 43 | |
44 | <li><a href="#manual">Manual</a></li> | ||
45 | |||
46 | <li><a href="#credits">Credits</a></li> | ||
47 | |||
48 | <li><a href="#contact">Contact us</a></li> | ||
43 | </ul> | 49 | </ul> |
44 | 50 | ||
45 | <a name="over"></a> | 51 | <a name="over"></a> |
52 | |||
46 | <h2>Overview</h2> | 53 | <h2>Overview</h2> |
47 | <p> | ||
48 | LuaFileSystem is a library developed to complement the set of functions | ||
49 | related to file systems offered by the standard Lua distribution. | ||
50 | One of its goals is to be as portable as Lua. | ||
51 | <p> | ||
52 | LuaFileSystem is free software and uses the same | ||
53 | <a href="license.html">license</a> | ||
54 | as Lua 5.0. | ||
55 | 54 | ||
55 | <p>LuaFileSystem is a library developed to complement the set of | ||
56 | functions related to file systems offered by the standard Lua | ||
57 | distribution. One of its goals is to be as portable as Lua.</p> | ||
58 | |||
59 | <p>LuaFileSystem is free software and uses the same <a href= | ||
60 | "license.html">license</a> as Lua 5.0. <a name="version"></a></p> | ||
56 | 61 | ||
57 | <a name="version"></a> | ||
58 | <h2>Current version</h2> | 62 | <h2>Current version</h2> |
59 | <p> | 63 | |
60 | Current version is 1.0 beta. | 64 | <p>Current version is 1.0 beta. It was developed for Lua 5.0.</p> |
61 | It was developed for Lua 5.0. | 65 | |
62 | </p> | 66 | <p>Version 1.0 follows the <a href= |
63 | <p> | 67 | "http://www.keplerproject.org/compat">package proposal</a> for Lua |
64 | Version 1.0 follows the | 68 | 5.1 (see section <a href="#installation">Installation</a> for more |
65 | <a href="http://www.keplerproject.org/compat">package proposal</a> | 69 | details). <a name="download"></a></p> |
66 | for Lua 5.1 | 70 | |
67 | (see section <a href="#installation">Installation</a> for more details). | ||
68 | |||
69 | |||
70 | <a name="download"></a> | ||
71 | <h2>Download</h2> | 71 | <h2>Download</h2> |
72 | <p> | ||
73 | LuaFileSystem can be downloaded from its | ||
74 | <a href="http://luaforge.net/project/showfiles.php?group_id=66">Lua Forge</a> | ||
75 | page. | ||
76 | 72 | ||
73 | <p>LuaFileSystem can be downloaded from its <a href= | ||
74 | "http://luaforge.net/project/showfiles.php?group_id=66">Lua | ||
75 | Forge</a> page. <a name="new"></a></p> | ||
77 | 76 | ||
78 | <a name="new"></a> | ||
79 | <h2>What's new</h2> | 77 | <h2>What's new</h2> |
80 | <p> | 78 | |
81 | <ul> | 79 | <ul> |
82 | <li>[10/nov/2004] Version 1.0 beta released | 80 | <li>[10/nov/2004] Version 1.0 beta released</li> |
83 | </ul> | 81 | </ul> |
84 | 82 | ||
83 | <a name="installation"></a> | ||
85 | 84 | ||
86 | <a name="installation"></a> | ||
87 | <h2>Installation</h2> | 85 | <h2>Installation</h2> |
88 | <p> | ||
89 | LuaFileSystem is distributed as a pair of C source and header files. | ||
90 | The distribution provides a <tt>Makefile</tt> prepared to compile the | ||
91 | library and install it. | ||
92 | The file <tt>config</tt> should be edited to suit the needs of the aimed | ||
93 | platform. | ||
94 | </p> | ||
95 | <p> | ||
96 | LuaFileSystem follows the | ||
97 | <a href="http://www.keplerproject.org/compat">package proposal</a> | ||
98 | for Lua 5.1, | ||
99 | therefore this package should be "installed". | ||
100 | In other words, | ||
101 | if you are using Lua 5.0, | ||
102 | the files <tt>compat-5.1.c</tt> and <tt>compat-5.1.h</tt> must be used | ||
103 | in the compilation and the file <tt>compat-5.1.lua</tt> must be installed | ||
104 | in the <tt>LUA_PATH</tt>. | ||
105 | If you are using Lua 5.1, | ||
106 | nothing should be done. | ||
107 | </p> | ||
108 | |||
109 | |||
110 | <a name="credits"></a> | ||
111 | <h2>Credits</h2> | ||
112 | 86 | ||
113 | <p> | 87 | <p>LuaFileSystem is distributed as a pair of C source and header |
114 | LuaFileSystem was designed by Roberto Ierusalimschy, | 88 | files. The distribution provides a <tt>Makefile</tt> prepared to |
115 | André Carregal and Tomás Guisasola as part of | 89 | compile the library and install it. The file <tt>config</tt> should |
116 | <a href="http://www.keplerproject.org">The Kepler Project</a> | 90 | be edited to suit the needs of the aimed platform.</p> |
117 | which holds its copyright. | ||
118 | </p> | ||
119 | 91 | ||
92 | <p>LuaFileSystem follows the <a href= | ||
93 | "http://www.keplerproject.org/compat">package proposal</a> for Lua | ||
94 | 5.1, therefore this package should be "installed". In other words, | ||
95 | if you are using Lua 5.0, the files <tt>compat-5.1.c</tt> and | ||
96 | <tt>compat-5.1.h</tt> must be used in the compilation and the file | ||
97 | <tt>compat-5.1.lua</tt> must be installed in the <tt>LUA_PATH</tt>. | ||
98 | If you are using Lua 5.1, nothing should be done.</p> | ||
120 | 99 | ||
121 | <a name="contact"></a> | 100 | <a name="credits"></a> |
122 | <h2>Contact us</h2> | ||
123 | 101 | ||
124 | <p> | 102 | <h2>Credits</h2> |
125 | For more information please | ||
126 | <a href="mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us</a>. | ||
127 | Comments are welcome! | ||
128 | </p> | ||
129 | 103 | ||
104 | <p>LuaFileSystem was designed by Roberto Ierusalimschy, | ||
105 | André Carregal and Tomás Guisasola as part of <a | ||
106 | href="http://www.keplerproject.org">The Kepler Project</a> which | ||
107 | holds its copyright.</p> | ||
130 | 108 | ||
109 | <a name="contact"></a> | ||
131 | 110 | ||
132 | <p> | 111 | <h2>Contact us</h2> |
133 | <hr> | ||
134 | <small> | ||
135 | $Id: index.html,v 1.6 2004/11/11 15:33:20 tomas Exp $ | ||
136 | </small> | ||
137 | 112 | ||
113 | <p>For more information please <a href= | ||
114 | "mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us</a>. | ||
115 | Comments are welcome!</p> | ||
116 | |||
117 | <hr> | ||
118 | <small>$Id: index.html,v 1.6 2004/11/11 15:33:20 tomas Exp | ||
119 | $</small> | ||
138 | </body> | 120 | </body> |
139 | </html> | 121 | </html> |
140 | 122 | ||
diff --git a/doc/us/license.html b/doc/us/license.html index f01eb86..f05609c 100644 --- a/doc/us/license.html +++ b/doc/us/license.html | |||
@@ -1,78 +1,68 @@ | |||
1 | <! See Copyright Notice at the end of this file> | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
2 | <HTML> | 2 | <html> |
3 | <HEAD> | 3 | <head> |
4 | <TITLE>LuaFileSystem: license</TITLE> | 4 | <meta name="generator" content="HTML Tidy, see www.w3.org"> |
5 | </HEAD> | 5 | <title>LuaFileSystem: license</title> |
6 | </head> | ||
7 | <body bgcolor="#FFFFFF"> | ||
8 | <hr> | ||
9 | <h1>License</h1> | ||
6 | 10 | ||
7 | <BODY BGCOLOR="#FFFFFF"> | 11 | LuaFileSystem is free software: it can be used for both academic |
12 | and commercial purposes at absolutely no cost. There are no | ||
13 | royalties or GNU-like "copyleft" restrictions. LuaFileSystem | ||
14 | qualifies as <a href= | ||
15 | "http://www.opensource.org/docs/definition.html">Open Source</a> | ||
16 | software. Its licenses are compatible with <a href= | ||
17 | "http://www.gnu.org/licenses/gpl.html">GPL</a>. LuaFileSystem is | ||
18 | not in the public domain and <a href= | ||
19 | "http://www.keplerproject.org">The Kepler Project</a> keep its | ||
20 | copyright. The legal details are below. | ||
8 | 21 | ||
9 | <HR> | 22 | <p>The spirit of the license is that you are free to use |
10 | <H1> | 23 | LuaFileSystem for any purpose at no cost without having to ask us. |
11 | License | 24 | The only requirement is that if you do use LuaFileSystem, then you |
12 | </H1> | 25 | should give us credit by including the appropriate copyright notice |
26 | somewhere in your product or its documentation.</p> | ||
13 | 27 | ||
14 | LuaFileSystem | 28 | <p>The LuaFileSystem library is designed and implemented by Roberto |
15 | is free software: | 29 | Ierusalimschy, André Carregal and Tomás Guisasola. |
16 | it can be used for both academic and commercial purposes at absolutely no cost. | 30 | The implementation is not derived from licensed software.</p> |
17 | There are no royalties or GNU-like "copyleft" restrictions. | ||
18 | LuaFileSystem qualifies as | ||
19 | <A HREF="http://www.opensource.org/docs/definition.html">Open Source</A> | ||
20 | software. | ||
21 | Its licenses are compatible with | ||
22 | <A HREF="http://www.gnu.org/licenses/gpl.html">GPL</A>. | ||
23 | LuaFileSystem is not in the public domain and | ||
24 | <a href="http://www.keplerproject.org">The Kepler Project</a> | ||
25 | keep its copyright. | ||
26 | The legal details are below. | ||
27 | <P> | ||
28 | |||
29 | The spirit of the license is that | ||
30 | you are free to use LuaFileSystem for any purpose at no cost without having to ask us. | ||
31 | The only requirement is that | ||
32 | if you do use LuaFileSystem, | ||
33 | then you should give us credit by including the appropriate copyright notice | ||
34 | somewhere in your product or its documentation. | ||
35 | <P> | ||
36 | |||
37 | The LuaFileSystem library is designed and implemented | ||
38 | by | ||
39 | Roberto Ierusalimschy, | ||
40 | André Carregal and | ||
41 | Tomás Guisasola. | ||
42 | The implementation is not derived from licensed software. | ||
43 | <P> | ||
44 | 31 | ||
32 | <p> | ||
45 | <!-- ===================================================================== --> | 33 | <!-- ===================================================================== --> |
46 | <HR> | 34 | </p> |
47 | Copyright © 2004 The Kepler Project. | ||
48 | <P> | ||
49 | 35 | ||
50 | Permission is hereby granted, free of charge, to any person obtaining a copy | 36 | <hr> |
51 | of this software and associated documentation files (the "Software"), to deal | 37 | Copyright © 2004 The Kepler Project. |
52 | in the Software without restriction, including without limitation the rights | ||
53 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
54 | copies of the Software, and to permit persons to whom the Software is | ||
55 | furnished to do so, subject to the following conditions: | ||
56 | <P> | ||
57 | 38 | ||
58 | The above copyright notice and this permission notice shall be included in | 39 | <p>Permission is hereby granted, free of charge, to any person |
59 | all copies or substantial portions of the Software. | 40 | obtaining a copy of this software and associated documentation |
60 | <P> | 41 | files (the "Software"), to deal in the Software without |
42 | restriction, including without limitation the rights to use, copy, | ||
43 | modify, merge, publish, distribute, sublicense, and/or sell copies | ||
44 | of the Software, and to permit persons to whom the Software is | ||
45 | furnished to do so, subject to the following conditions:</p> | ||
61 | 46 | ||
62 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 47 | <p>The above copyright notice and this permission notice shall be |
63 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 48 | included in all copies or substantial portions of the Software.</p> |
64 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
65 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
66 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
67 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
68 | THE SOFTWARE. | ||
69 | <P> | ||
70 | 49 | ||
50 | <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
51 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
52 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
53 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
54 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
55 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
56 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
57 | SOFTWARE.</p> | ||
58 | |||
59 | <p> | ||
71 | <!-- ===================================================================== --> | 60 | <!-- ===================================================================== --> |
72 | <HR> | 61 | </p> |
73 | <SMALL> | 62 | |
74 | $Id: license.html,v 1.1 2004/07/27 14:15:24 tomas Exp $ | 63 | <hr> |
75 | </SMALL> | 64 | <small>$Id: license.html,v 1.1.1.1 2004/07/27 14:15:24 tomas Exp |
65 | $</small> | ||
66 | </body> | ||
67 | </html> | ||
76 | 68 | ||
77 | </BODY> | ||
78 | </HTML> | ||
diff --git a/doc/us/manual.html b/doc/us/manual.html index ec92531..0d9ab61 100644 --- a/doc/us/manual.html +++ b/doc/us/manual.html | |||
@@ -1,133 +1,132 @@ | |||
1 | <! See Copyright Notice in license.html> | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 | <html> | 2 | <html> |
3 | |||
4 | <head> | 3 | <head> |
4 | <meta name="generator" content="HTML Tidy, see www.w3.org"> | ||
5 | <title>LuaFileSystem</title> | 5 | <title>LuaFileSystem</title> |
6 | <style type="text/css"> | 6 | <style type="text/css"> |
7 | ul { list-style-type: disc }; | 7 | ul { list-style-type: disc }; |
8 | </style> | 8 | </style> |
9 | </head> | 9 | </head> |
10 | |||
11 | <body bgcolor="#FFFFFF"> | 10 | <body bgcolor="#FFFFFF"> |
12 | |||
13 | <hr> | 11 | <hr> |
14 | |||
15 | <center> | 12 | <center> |
16 | <table border=0 cellspacing=2 cellpadding=2> | 13 | <table border="0" cellspacing="2" cellpadding="2"> |
17 | <tr><td align=center><a href="http://www.keplerproject.org/luafilesystem"> | 14 | <tr> |
18 | <img border=0 alt="LuaFileSystem logo" src="luafilesystem.png"></a> | 15 | <td align="center"><a href= |
19 | <tr><td align=center><big><b>LuaFileSystem Reference Manual</b></big> | 16 | "http://www.keplerproject.org/luafilesystem"><img border="0" alt= |
20 | <tr><td align=center valign=top>File system library for the | 17 | "LuaFileSystem logo" src="luafilesystem.png"></a> </td> |
21 | <a href="http://www.lua.org">Lua</a> | 18 | </tr> |
22 | programming language | 19 | |
20 | <tr> | ||
21 | <td align="center"><big><b>LuaFileSystem Reference Manual</b></big> | ||
22 | </td> | ||
23 | </tr> | ||
24 | |||
25 | <tr> | ||
26 | <td align="center" valign="top">File system library for the <a | ||
27 | href="http://www.lua.org">Lua</a> programming language</td> | ||
28 | </tr> | ||
23 | </table> | 29 | </table> |
24 | </center> | 30 | </center> |
25 | <p> | ||
26 | 31 | ||
27 | <center><small> | 32 | <center><small><a href="index.html">home</a> · <a href= |
28 | <a href="index.html">home</a> · | 33 | "#introduction">introduction</a> · <a href= |
29 | <a href="#introduction">introduction</a> · | 34 | "#reference">reference</a> · <a href= |
30 | <a href="#reference">reference</a> · | 35 | "#example">example</a></small></center> |
31 | <a href="#example">example</a> | ||
32 | </small></center> | ||
33 | <p> | ||
34 | 36 | ||
35 | <hr> | 37 | <hr> |
38 | <a name="introduction"></a> | ||
36 | 39 | ||
37 | <a name="introduction"></a> | ||
38 | <h2>Introduction</h2> | 40 | <h2>Introduction</h2> |
39 | 41 | ||
40 | <p> | 42 | <p>LuaFileSystem is a <a href="http://www.lua.org">Lua</a> library |
41 | LuaFileSystem is a <a href="http://www.lua.org">Lua</a> library | 43 | developed to complement the set of functions related to file |
42 | developed to complement the set of functions related to file systems offered | 44 | systems offered by the standard Lua distribution.</p> |
43 | by the standard Lua distribution. | 45 | |
44 | <p> | 46 | <p>LuaFileSystem is free software and uses the same <a href= |
45 | LuaFileSystem is free software and uses the same | 47 | "license.html">license</a> as Lua 5.0.</p> |
46 | <a href="license.html">license</a> | ||
47 | as Lua 5.0. | ||
48 | </p> | ||
49 | 48 | ||
49 | <a name="reference"></a> | ||
50 | 50 | ||
51 | <a name="reference"></a> | ||
52 | <h2>Reference</h2> | 51 | <h2>Reference</h2> |
53 | 52 | ||
54 | <p> | 53 | <p>LuaFileSystem offers the following functions:</p> |
55 | LuaFileSystem offers the following functions: | ||
56 | <ul> | ||
57 | <a name="attributes"></a> | ||
58 | <li> <b><tt>lfs.attributes (filepath)</tt></b> <br> | ||
59 | Obtains the file attributes. | ||
60 | The attributes are: | ||
61 | <ul> | ||
62 | <i>dev</i>, device inode resides on;<br> | ||
63 | <i>ino</i>, inode's number;<br> | ||
64 | <i>mode</i>, inode protection mode (<small>values could be | ||
65 | <tt>file</tt>, <tt>directory</tt>, <tt>link</tt>, <tt>socket</tt>, <tt>named pipe</tt>, <tt>char device</tt>, <tt>block device</tt> or <tt>other</tt></small>);<br> | ||
66 | <i>nlink</i>, number of hard links to the file;<br> | ||
67 | <i>uid</i>, user-id of owner;<br> | ||
68 | <i>gid</i>, group-id of owner;<br> | ||
69 | <i>rdev</i>, device type, for special file inode;<br> | ||
70 | <i>access</i>, time of last access;<br> | ||
71 | <i>modification</i>, time of last data modification;<br> | ||
72 | <i>change</i>, time of last file status change;<br> | ||
73 | <i>size</i>, file size, in bytes;<br> | ||
74 | <i>blocks</i>, block allocated for file; (Unix only)<br> | ||
75 | <i>blksize</i>, optimal file system I/O blocksize; (Unix only)<br> | ||
76 | </ul> | ||
77 | Returns a table with file attributes described above. | ||
78 | |||
79 | <a name="chdir"></a> | ||
80 | <li> <b><tt>lfs.chdir (path)</tt></b> <br> | ||
81 | Changes the current working directory to the given <tt>path</tt>.<br> | ||
82 | Returns <tt>true</tt> in case of success or <tt>nil</tt> plus an error | ||
83 | string. | ||
84 | |||
85 | <a name="getcwd"></a> | ||
86 | <li> <b><tt>lfs.currentdir ()</tt></b> <br> | ||
87 | Returns a string with the current working directory or | ||
88 | <code>nil</code> plus an error string. | ||
89 | |||
90 | <a name="dir"></a> | ||
91 | <li> <b><tt>lfs.dir (path)</tt></b> <br> | ||
92 | Lua iterator over the entries of a given directory. | ||
93 | Raises an error if <tt>path</tt> is not a directory. | ||
94 | |||
95 | <a name="lock"></a> | ||
96 | <li> <b><tt>lfs.lock (filehandle, mode[, start[, length]])</tt></b> <br> | ||
97 | Locks a file or a part of it. | ||
98 | This function works on <em>open files</em>; | ||
99 | the file handle should be specified as the first argument. | ||
100 | The string <code>mode</code> could be either <code>r</code> (for a | ||
101 | read/shared lock) or <code>w</code> (for a write/exclusive lock). | ||
102 | The optional arguments <code>start</code> and <code>length</code> can be | ||
103 | used to specify a starting point and its length; | ||
104 | both should be numbers.<br> | ||
105 | Returns a boolean indicating if the operation was successful; | ||
106 | in case of error, it returns <code>false</code> plus an error string. | ||
107 | |||
108 | <a name="mkdir"></a> | ||
109 | <li> <b><tt>lfs.mkdir (dirname)</tt></b> <br> | ||
110 | Creates a new directory. | ||
111 | The argument is the name of the new directory.<br> | ||
112 | Returns a boolean indicating whether the operation succeeds or not | ||
113 | (in this case, an error string is returned too). | ||
114 | |||
115 | <a name="unlock"></a> | ||
116 | <li> <b><tt>lfs.unlock (filehandle[, start[, length]])</tt></b> <br> | ||
117 | Unlocks a file or a part of it. | ||
118 | This function works on <em>open files</em>; | ||
119 | the file handle should be specified as the first argument. | ||
120 | The optional arguments <code>start</code> and <code>length</code> can be | ||
121 | used to specify a starting point and its length; | ||
122 | both should be numbers.<br> | ||
123 | Returns a boolean indicating if the operation was successful; | ||
124 | in case of error, it returns <code>false</code> plus a string describing the | ||
125 | error. | ||
126 | 54 | ||
55 | <ul> | ||
56 | <li style="list-style: none"><a name="attributes"></a></li> | ||
57 | |||
58 | <li><b><tt>lfs.attributes (filepath)</tt></b><br> | ||
59 | Obtains the file attributes. The attributes are: | ||
60 | |||
61 | <div style="margin-left: 2em"><i>dev</i>, device inode resides | ||
62 | on;<br> | ||
63 | <i>ino</i>, inode's number;<br> | ||
64 | <i>mode</i>, inode protection mode (<small>values could be | ||
65 | <tt>file</tt>, <tt>directory</tt>, <tt>link</tt>, <tt>socket</tt>, | ||
66 | <tt>named pipe</tt>, <tt>char device</tt>, <tt>block device</tt> or | ||
67 | <tt>other</tt></small>);<br> | ||
68 | <i>nlink</i>, number of hard links to the file;<br> | ||
69 | <i>uid</i>, user-id of owner;<br> | ||
70 | <i>gid</i>, group-id of owner;<br> | ||
71 | <i>rdev</i>, device type, for special file inode;<br> | ||
72 | <i>access</i>, time of last access;<br> | ||
73 | <i>modification</i>, time of last data modification;<br> | ||
74 | <i>change</i>, time of last file status change;<br> | ||
75 | <i>size</i>, file size, in bytes;<br> | ||
76 | <i>blocks</i>, block allocated for file; (Unix only)<br> | ||
77 | <i>blksize</i>, optimal file system I/O blocksize; (Unix only)<br> | ||
78 | </div> | ||
79 | |||
80 | Returns a table with file attributes described above. <a name= | ||
81 | "chdir"></a></li> | ||
82 | |||
83 | <li><b><tt>lfs.chdir (path)</tt></b><br> | ||
84 | Changes the current working directory to the given | ||
85 | <tt>path</tt>.<br> | ||
86 | Returns <tt>true</tt> in case of success or <tt>nil</tt> plus an | ||
87 | error string. <a name="getcwd"></a></li> | ||
88 | |||
89 | <li><b><tt>lfs.currentdir ()</tt></b><br> | ||
90 | Returns a string with the current working directory or | ||
91 | <code>nil</code> plus an error string. <a name="dir"></a></li> | ||
92 | |||
93 | <li><b><tt>lfs.dir (path)</tt></b><br> | ||
94 | Lua iterator over the entries of a given directory. Raises an | ||
95 | error if <tt>path</tt> is not a directory. <a name="lock"></a></li> | ||
96 | |||
97 | <li><b><tt>lfs.lock (filehandle, mode[, start[, | ||
98 | length]])</tt></b><br> | ||
99 | Locks a file or a part of it. This function works on <em>open | ||
100 | files</em>; the file handle should be specified as the first | ||
101 | argument. The string <code>mode</code> could be either | ||
102 | <code>r</code> (for a read/shared lock) or <code>w</code> (for a | ||
103 | write/exclusive lock). The optional arguments <code>start</code> | ||
104 | and <code>length</code> can be used to specify a starting point and | ||
105 | its length; both should be numbers.<br> | ||
106 | Returns a boolean indicating if the operation was successful; in | ||
107 | case of error, it returns <code>false</code> plus an error string. | ||
108 | <a name="mkdir"></a></li> | ||
109 | |||
110 | <li><b><tt>lfs.mkdir (dirname)</tt></b><br> | ||
111 | Creates a new directory. The argument is the name of the new | ||
112 | directory.<br> | ||
113 | Returns a boolean indicating whether the operation succeeds or not | ||
114 | (in this case, an error string is returned too). <a name= | ||
115 | "unlock"></a></li> | ||
116 | |||
117 | <li><b><tt>lfs.unlock (filehandle[, start[, length]])</tt></b><br> | ||
118 | Unlocks a file or a part of it. This function works on <em>open | ||
119 | files</em>; the file handle should be specified as the first | ||
120 | argument. The optional arguments <code>start</code> and | ||
121 | <code>length</code> can be used to specify a starting point and its | ||
122 | length; both should be numbers.<br> | ||
123 | Returns a boolean indicating if the operation was successful; in | ||
124 | case of error, it returns <code>false</code> plus a string | ||
125 | describing the error.</li> | ||
127 | </ul> | 126 | </ul> |
128 | 127 | ||
128 | <a name="example"></a> | ||
129 | 129 | ||
130 | <a name="example"></a> | ||
131 | <h2>Example</h2> | 130 | <h2>Example</h2> |
132 | 131 | ||
133 | <pre> | 132 | <pre> |
@@ -154,39 +153,45 @@ end | |||
154 | attrdir (".") | 153 | attrdir (".") |
155 | </pre> | 154 | </pre> |
156 | 155 | ||
156 | <a name="contents"></a> | ||
157 | 157 | ||
158 | <a name="contents"></a> | ||
159 | <h2>Contents</h2> | 158 | <h2>Contents</h2> |
160 | <p> | 159 | |
160 | <ul> | ||
161 | <li><a href="#introduction">Introduction</a></li> | ||
162 | |||
163 | <li><a href="#reference">Reference</a> | ||
164 | |||
161 | <ul> | 165 | <ul> |
162 | <li> <a href="#introduction">Introduction</a> | 166 | <li><a href="#chdir">chdir</a></li> |
163 | <li> <a href="#reference">Reference</a> | 167 | |
164 | <ul> | 168 | <li><a href="#currentdir">currentdir</a></li> |
165 | <li> <a href="#chdir">chdir</a> | 169 | |
166 | <li> <a href="#currentdir">currentdir</a> | 170 | <li><a href="#dir">dir</a></li> |
167 | <li> <a href="#dir">dir</a> | 171 | |
168 | <li> <a href="#lock">lock</a> | 172 | <li><a href="#lock">lock</a></li> |
169 | <li> <a href="#mkdir">mkdir</a> | 173 | |
170 | <li> <a href="#unlock">unlock</a> | 174 | <li><a href="#mkdir">mkdir</a></li> |
171 | </ul> | 175 | |
172 | <li> <a href="#examples">Examples</a> | 176 | <li><a href="#unlock">unlock</a></li> |
173 | </ul> | 177 | </ul> |
174 | </p> | 178 | </li> |
175 | 179 | ||
180 | <li><a href="#examples">Examples</a></li> | ||
181 | </ul> | ||
176 | 182 | ||
177 | <p> | 183 | <br> |
178 | <center><small> | 184 | <br> |
179 | <a href="index.html">home</a> · | 185 | |
180 | <a href="#introduction">introduction</a> · | ||
181 | <a href="#reference">reference</a> · | ||
182 | <a href="#example">example</a> | ||
183 | </small></center> | ||
184 | <p> | ||
185 | 186 | ||
186 | <hr> | 187 | <center><small><a href="index.html">home</a> · <a href= |
187 | <small> | 188 | "#introduction">introduction</a> · <a href= |
188 | $Id: manual.html,v 1.7 2004/11/10 14:09:45 tuler Exp $ | 189 | "#reference">reference</a> · <a href= |
189 | </small> | 190 | "#example">example</a></small></center> |
190 | 191 | ||
192 | <hr> | ||
193 | <small>$Id: manual.html,v 1.7 2004/11/10 14:09:45 tuler Exp | ||
194 | $</small> | ||
191 | </body> | 195 | </body> |
192 | </html> | 196 | </html> |
197 | |||