aboutsummaryrefslogtreecommitdiff
path: root/doc/us
diff options
context:
space:
mode:
Diffstat (limited to 'doc/us')
-rw-r--r--doc/us/manual.html44
1 files changed, 31 insertions, 13 deletions
diff --git a/doc/us/manual.html b/doc/us/manual.html
index 5ca685d..3afde68 100644
--- a/doc/us/manual.html
+++ b/doc/us/manual.html
@@ -56,24 +56,41 @@ LuaFileSystem offers the following functions:
56<ul> 56<ul>
57 <a name="attributes"></a> 57 <a name="attributes"></a>
58 <li> <b><tt>lfs.attributes (filepath)</tt></b> <br> 58 <li> <b><tt>lfs.attributes (filepath)</tt></b> <br>
59 Returns a table with file attributes. 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;<br>
75 <i>blksize</i>, optimal file system I/O blocksize;<br>
76 </ul>
77 Returns a table with file attributes described above.
60 78
61 <a name="chdir"></a> 79 <a name="chdir"></a>
62 <li> <b><tt>lfs.chdir (path)</tt></b> <br> 80 <li> <b><tt>lfs.chdir (path)</tt></b> <br>
63 Changes the current 81 Changes the current working directory to the given <tt>path</tt>.<br>
64 working directory to the given <tt>path</tt>.
65 Returns <tt>true</tt> in case of success or <tt>nil</tt> plus an error 82 Returns <tt>true</tt> in case of success or <tt>nil</tt> plus an error
66 string. 83 string.
67 84
68 <a name="getcwd"></a> 85 <a name="getcwd"></a>
69 <li> <b><tt>lfs.currentdir ()</tt></b> <br> 86 <li> <b><tt>lfs.currentdir ()</tt></b> <br>
70 Returns the current 87 Returns a string with the current working directory or
71 working directory or <code>nil</code> plus an error string. 88 <code>nil</code> plus an error string.
72 89
73 <a name="dir"></a> 90 <a name="dir"></a>
74 <li> <b><tt>lfs.dir (path)</tt></b> <br> 91 <li> <b><tt>lfs.dir (path)</tt></b> <br>
75 Lua iterator over the entries 92 Lua iterator over the entries of a given directory.
76 of a given directory. 93 Raises an error if <tt>path</tt> is not a directory.
77 94
78 <a name="lock"></a> 95 <a name="lock"></a>
79 <li> <b><tt>lfs.lock (filehandle, mode[, start[, length]])</tt></b> <br> 96 <li> <b><tt>lfs.lock (filehandle, mode[, start[, length]])</tt></b> <br>
@@ -84,15 +101,16 @@ LuaFileSystem offers the following functions:
84 read/shared lock) or <code>w</code> (for a write/exclusive lock). 101 read/shared lock) or <code>w</code> (for a write/exclusive lock).
85 The optional arguments <code>start</code> and <code>length</code> can be 102 The optional arguments <code>start</code> and <code>length</code> can be
86 used to specify a starting point and its length; 103 used to specify a starting point and its length;
87 both should be numbers. 104 both should be numbers.<br>
88 Returns a boolean indicating if the operation was successful; 105 Returns a boolean indicating if the operation was successful;
89 in case of error, it returns <code>false</code> plus an error string. 106 in case of error, it returns <code>false</code> plus an error string.
90 107
91 <a name="mkdir"></a> 108 <a name="mkdir"></a>
92 <li> <b><tt>lfs.mkdir (dirname)</tt></b> <br> 109 <li> <b><tt>lfs.mkdir (dirname)</tt></b> <br>
93 Creates a new directory. 110 Creates a new directory.
94 The argument is the name of the new directory. 111 The argument is the name of the new directory.<br>
95 Returns a boolean indicating whether the operation succeeds or not. 112 Returns a boolean indicating whether the operation succeeds or not
113 (in this case, an error string is returned too).
96 114
97 <a name="unlock"></a> 115 <a name="unlock"></a>
98 <li> <b><tt>lfs.unlock (filehandle[, start[, length]])</tt></b> <br> 116 <li> <b><tt>lfs.unlock (filehandle[, start[, length]])</tt></b> <br>
@@ -101,8 +119,8 @@ LuaFileSystem offers the following functions:
101 the file handle should be specified as the first argument. 119 the file handle should be specified as the first argument.
102 The optional arguments <code>start</code> and <code>length</code> can be 120 The optional arguments <code>start</code> and <code>length</code> can be
103 used to specify a starting point and its length; 121 used to specify a starting point and its length;
104 both should be numbers. 122 both should be numbers.<br>
105 This function returns a boolean indicating if the operation was successful; 123 Returns a boolean indicating if the operation was successful;
106 in case of error, it returns <code>false</code> plus a string describing the 124 in case of error, it returns <code>false</code> plus a string describing the
107 error. 125 error.
108 126
@@ -167,7 +185,7 @@ attrdir (".")
167 185
168<hr> 186<hr>
169<small> 187<small>
170$Id: manual.html,v 1.5 2004/11/01 15:27:13 tomas Exp $ 188$Id: manual.html,v 1.6 2004/11/05 10:37:29 tomas Exp $
171</small> 189</small>
172 190
173</body> 191</body>