diff options
author | tomas <tomas> | 2005-01-24 10:59:58 +0000 |
---|---|---|
committer | tomas <tomas> | 2005-01-24 10:59:58 +0000 |
commit | 5f942164a0cf9fd11545fffb5e54e446bd42ecd4 (patch) | |
tree | 25cb2f9b30926ac2050c4cf855899c7b03ab370c /doc/us | |
parent | 2540f6cbdb94ba60fe2ef94f12fc85f60c8ce767 (diff) | |
download | luafilesystem-5f942164a0cf9fd11545fffb5e54e446bd42ecd4.tar.gz luafilesystem-5f942164a0cf9fd11545fffb5e54e446bd42ecd4.tar.bz2 luafilesystem-5f942164a0cf9fd11545fffb5e54e446bd42ecd4.zip |
Acrescimo de documentacao da lfs.touch.
Adaptacao para a versao 1.1.
Diffstat (limited to 'doc/us')
-rw-r--r-- | doc/us/index.html | 20 | ||||
-rw-r--r-- | doc/us/manual.html | 47 |
2 files changed, 44 insertions, 23 deletions
diff --git a/doc/us/index.html b/doc/us/index.html index a96e2e6..90c15ee 100644 --- a/doc/us/index.html +++ b/doc/us/index.html | |||
@@ -39,20 +39,14 @@ href="http://www.lua.org">Lua</a> Programming Language</td> | |||
39 | 39 | ||
40 | <ul> | 40 | <ul> |
41 | <li><a href="#over">Overview</a></li> | 41 | <li><a href="#over">Overview</a></li> |
42 | |||
43 | <li><a href="#version">Current Version</a></li> | 42 | <li><a href="#version">Current Version</a></li> |
44 | |||
45 | <li><a href="#download">Download</a></li> | 43 | <li><a href="#download">Download</a></li> |
46 | |||
47 | <li><a href="#manual">Manual</a></li> | 44 | <li><a href="#manual">Manual</a></li> |
48 | |||
49 | <li><a href="#credits">Credits</a></li> | 45 | <li><a href="#credits">Credits</a></li> |
50 | |||
51 | <li><a href="#contact">Contact us</a></li> | 46 | <li><a href="#contact">Contact us</a></li> |
52 | </ul> | 47 | </ul> |
53 | 48 | ||
54 | <a name="over"></a> | 49 | <a name="over"></a> |
55 | |||
56 | <h2>Overview</h2> | 50 | <h2>Overview</h2> |
57 | 51 | ||
58 | <p>LuaFileSystem is a library developed to complement the set of | 52 | <p>LuaFileSystem is a library developed to complement the set of |
@@ -60,13 +54,16 @@ functions related to file systems offered by the standard Lua | |||
60 | 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.</p> |
61 | 55 | ||
62 | <p>LuaFileSystem is free software and uses the same <a href= | 56 | <p>LuaFileSystem is free software and uses the same <a href= |
63 | "license.html">license</a> as Lua 5.0. <a name="version"></a></p> | 57 | "license.html">license</a> as Lua 5.0. |
58 | </p> | ||
64 | 59 | ||
60 | <a name="version"></a> | ||
65 | <h2>Current version</h2> | 61 | <h2>Current version</h2> |
66 | 62 | ||
67 | <p>Current version is 1.0. It was developed for Lua 5.0.</p> | 63 | <p>Current version is 1.1. |
64 | It was developed for Lua 5.0.</p> | ||
68 | 65 | ||
69 | <p>Version 1.0 follows the | 66 | <p>Version 1.1 follows the |
70 | <a href="http://www.keplerproject.org/compat">package proposal</a> | 67 | <a href="http://www.keplerproject.org/compat">package proposal</a> |
71 | for Lua 5.1 (see section <a href="#installation">Installation</a> | 68 | for Lua 5.1 (see section <a href="#installation">Installation</a> |
72 | for more details). | 69 | for more details). |
@@ -85,10 +82,13 @@ page. | |||
85 | <h2>What's new</h2> | 82 | <h2>What's new</h2> |
86 | 83 | ||
87 | <ul> | 84 | <ul> |
85 | <li>[?/?/2005] Version 1.1 released</li> | ||
88 | <li>[21/Jan/2005] Version 1.0 released</li> | 86 | <li>[21/Jan/2005] Version 1.0 released</li> |
89 | <li>[10/Nov/2004] Version 1.0 beta released</li> | 87 | <li>[10/Nov/2004] Version 1.0 beta released</li> |
90 | </ul> | 88 | </ul> |
91 | 89 | ||
90 | Version 1.1 adds function <tt>lfs.touch</tt>. | ||
91 | |||
92 | <a name="installation"></a> | 92 | <a name="installation"></a> |
93 | <h2>Installation</h2> | 93 | <h2>Installation</h2> |
94 | 94 | ||
@@ -122,7 +122,7 @@ which holds its copyright.</p> | |||
122 | Comments are welcome!</p> | 122 | Comments are welcome!</p> |
123 | 123 | ||
124 | <hr> | 124 | <hr> |
125 | <small>$Id: index.html,v 1.9 2005/01/19 14:30:08 tomas Exp $</small> | 125 | <small>$Id: index.html,v 1.10 2005/01/24 10:59:58 tomas Exp $</small> |
126 | </body> | 126 | </body> |
127 | </html> | 127 | </html> |
128 | 128 | ||
diff --git a/doc/us/manual.html b/doc/us/manual.html index 0d9ab61..26a2192 100644 --- a/doc/us/manual.html +++ b/doc/us/manual.html | |||
@@ -53,8 +53,7 @@ systems offered by the standard Lua distribution.</p> | |||
53 | <p>LuaFileSystem offers the following functions:</p> | 53 | <p>LuaFileSystem offers the following functions:</p> |
54 | 54 | ||
55 | <ul> | 55 | <ul> |
56 | <li style="list-style: none"><a name="attributes"></a></li> | 56 | <a name="attributes"></a> |
57 | |||
58 | <li><b><tt>lfs.attributes (filepath)</tt></b><br> | 57 | <li><b><tt>lfs.attributes (filepath)</tt></b><br> |
59 | Obtains the file attributes. The attributes are: | 58 | Obtains the file attributes. The attributes are: |
60 | 59 | ||
@@ -77,25 +76,31 @@ on;<br> | |||
77 | <i>blksize</i>, optimal file system I/O blocksize; (Unix only)<br> | 76 | <i>blksize</i>, optimal file system I/O blocksize; (Unix only)<br> |
78 | </div> | 77 | </div> |
79 | 78 | ||
80 | Returns a table with file attributes described above. <a name= | 79 | Returns a table with file attributes described above. |
81 | "chdir"></a></li> | 80 | </li> |
82 | 81 | ||
82 | <a name="chdir"></a> | ||
83 | <li><b><tt>lfs.chdir (path)</tt></b><br> | 83 | <li><b><tt>lfs.chdir (path)</tt></b><br> |
84 | Changes the current working directory to the given | 84 | Changes the current working directory to the given |
85 | <tt>path</tt>.<br> | 85 | <tt>path</tt>.<br> |
86 | Returns <tt>true</tt> in case of success or <tt>nil</tt> plus an | 86 | Returns <tt>true</tt> in case of success or <tt>nil</tt> plus an |
87 | error string. <a name="getcwd"></a></li> | 87 | error string. |
88 | </li> | ||
88 | 89 | ||
90 | <a name="getcwd"></a> | ||
89 | <li><b><tt>lfs.currentdir ()</tt></b><br> | 91 | <li><b><tt>lfs.currentdir ()</tt></b><br> |
90 | Returns a string with the current working directory or | 92 | Returns a string with the current working directory or |
91 | <code>nil</code> plus an error string. <a name="dir"></a></li> | 93 | <code>nil</code> plus an error string. |
94 | </li> | ||
92 | 95 | ||
96 | <a name="dir"></a> | ||
93 | <li><b><tt>lfs.dir (path)</tt></b><br> | 97 | <li><b><tt>lfs.dir (path)</tt></b><br> |
94 | Lua iterator over the entries of a given directory. Raises an | 98 | 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> | 99 | error if <tt>path</tt> is not a directory. |
100 | </li> | ||
96 | 101 | ||
97 | <li><b><tt>lfs.lock (filehandle, mode[, start[, | 102 | <a name="lock"></a> |
98 | length]])</tt></b><br> | 103 | <li><b><tt>lfs.lock (filehandle, mode[, start[, length]])</tt></b><br> |
99 | Locks a file or a part of it. This function works on <em>open | 104 | 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 | 105 | files</em>; the file handle should be specified as the first |
101 | argument. The string <code>mode</code> could be either | 106 | argument. The string <code>mode</code> could be either |
@@ -105,15 +110,32 @@ and <code>length</code> can be used to specify a starting point and | |||
105 | its length; both should be numbers.<br> | 110 | its length; both should be numbers.<br> |
106 | Returns a boolean indicating if the operation was successful; in | 111 | Returns a boolean indicating if the operation was successful; in |
107 | case of error, it returns <code>false</code> plus an error string. | 112 | case of error, it returns <code>false</code> plus an error string. |
108 | <a name="mkdir"></a></li> | 113 | </li> |
109 | 114 | ||
115 | <a name="mkdir"></a> | ||
110 | <li><b><tt>lfs.mkdir (dirname)</tt></b><br> | 116 | <li><b><tt>lfs.mkdir (dirname)</tt></b><br> |
111 | Creates a new directory. The argument is the name of the new | 117 | Creates a new directory. The argument is the name of the new |
112 | directory.<br> | 118 | directory.<br> |
113 | Returns a boolean indicating whether the operation succeeds or not | 119 | Returns a boolean indicating whether the operation succeeds or not |
114 | (in this case, an error string is returned too). <a name= | 120 | (in this case, an error string is returned too). |
115 | "unlock"></a></li> | 121 | </li> |
116 | 122 | ||
123 | <a name="touch"></a> | ||
124 | <li><b><tt>lfs.touch (filepath [, atime [, mtime]])</tt></b><br> | ||
125 | Set access and modification times of a file. | ||
126 | This function is a bind to <tt>utime</tt> function. | ||
127 | The first argument is the filename, | ||
128 | the second argument is the access time, | ||
129 | and the third argument is the modification time. | ||
130 | Both times are provided in seconds (which should be generated with | ||
131 | Lua standard function <tt>os.date</tt>). | ||
132 | If the modifition time is omitted, the access time provided is used; | ||
133 | if both times are omitted, the current time is used.<br> | ||
134 | Returns a boolean indicating whethet the operation succeeds or not | ||
135 | (followed by an error string in case it fails). | ||
136 | </li> | ||
137 | |||
138 | <a name="unlock"></a> | ||
117 | <li><b><tt>lfs.unlock (filehandle[, start[, length]])</tt></b><br> | 139 | <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 | 140 | 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 | 141 | files</em>; the file handle should be specified as the first |
@@ -126,7 +148,6 @@ describing the error.</li> | |||
126 | </ul> | 148 | </ul> |
127 | 149 | ||
128 | <a name="example"></a> | 150 | <a name="example"></a> |
129 | |||
130 | <h2>Example</h2> | 151 | <h2>Example</h2> |
131 | 152 | ||
132 | <pre> | 153 | <pre> |