aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFabio Mascarenhas <mascarenhas@gmail.com>2011-06-09 14:09:31 -0700
committerFabio Mascarenhas <mascarenhas@gmail.com>2011-06-09 14:09:31 -0700
commit149e0fb8ec6295325e1e448bbe79b7e9bf2285aa (patch)
tree4d761ac2e47869a23e1958e144e1dfe4a4818479 /doc
parentd292b3243f90ba21450c0599b42aa89e999524ee (diff)
parent83faa7e05d288dcb543109509e17de25110203ef (diff)
downloadluafilesystem-149e0fb8ec6295325e1e448bbe79b7e9bf2285aa.tar.gz
luafilesystem-149e0fb8ec6295325e1e448bbe79b7e9bf2285aa.tar.bz2
luafilesystem-149e0fb8ec6295325e1e448bbe79b7e9bf2285aa.zip
Merge pull request #8 from rrthomas/master
New lfs.link and other goodies
Diffstat (limited to 'doc')
-rw-r--r--doc/us/manual.html17
1 files changed, 12 insertions, 5 deletions
diff --git a/doc/us/manual.html b/doc/us/manual.html
index 217c249..996dc1f 100644
--- a/doc/us/manual.html
+++ b/doc/us/manual.html
@@ -174,7 +174,7 @@ LuaFileSystem offers the following functions:
174 174
175 <dt><a name="chdir"></a><strong><code>lfs.lock_dir(path, [seconds_stale])</code></strong></dt> 175 <dt><a name="chdir"></a><strong><code>lfs.lock_dir(path, [seconds_stale])</code></strong></dt>
176 <dd>Creates a lockfile (called lockfile.lfs) in <code>path</code> if it does not 176 <dd>Creates a lockfile (called lockfile.lfs) in <code>path</code> if it does not
177 exist and returns the lock. If the lock already exists checks it 177 exist and returns the lock. If the lock already exists checks if
178 it's stale, using the second parameter (default for the second 178 it's stale, using the second parameter (default for the second
179 parameter is <code>INT_MAX</code>, which in practice means the lock will never 179 parameter is <code>INT_MAX</code>, which in practice means the lock will never
180 be stale. To free the the lock call <code>lock:free()</code>. <br/> 180 be stale. To free the the lock call <code>lock:free()</code>. <br/>
@@ -206,6 +206,13 @@ LuaFileSystem offers the following functions:
206 Returns <code>true</code> if the operation was successful; in 206 Returns <code>true</code> if the operation was successful; in
207 case of error, it returns <code>nil</code> plus an error string. 207 case of error, it returns <code>nil</code> plus an error string.
208 </dd> 208 </dd>
209
210 <dt><a name="link"></a><strong><code>lfs.link (old, new[, symlink])</code></strong></dt>
211 <dd>Creates a link. The first argument is the object to link to
212 and the second is the name of the link. If the optional third
213 argument is true, the link will by a symbolic link (by default, a
214 hard link is created).
215 </dd>
209 216
210 <dt><a name="mkdir"></a><strong><code>lfs.mkdir (dirname)</code></strong></dt> 217 <dt><a name="mkdir"></a><strong><code>lfs.mkdir (dirname)</code></strong></dt>
211 <dd>Creates a new directory. The argument is the name of the new 218 <dd>Creates a new directory. The argument is the name of the new
@@ -221,15 +228,15 @@ LuaFileSystem offers the following functions:
221 228
222 <dt><a name="setmode"></a><strong><code>lfs.setmode (file, mode)</code></strong></dt> 229 <dt><a name="setmode"></a><strong><code>lfs.setmode (file, mode)</code></strong></dt>
223 <dd>Sets the writing mode for a file. The mode string can be either <code>binary</code> or <code>text</code>. 230 <dd>Sets the writing mode for a file. The mode string can be either <code>binary</code> or <code>text</code>.
224 Returns the previous mode string for the file. This function is only available in Windows, so you may want to make sure that 231 Returns the previous mode string for the file. On non-Windows platforms, where the two modes are identical,
225 <code>lfs.setmode</code> exists before using it. 232 setting the mode has no effect, and the mode is always returned as <code>binary</code>.
226 </dd> 233 </dd>
227 234
228 <dt><a name="symlinkattributes"></a><strong><code>lfs.symlinkattributes (filepath [, aname])</code></strong></dt> 235 <dt><a name="symlinkattributes"></a><strong><code>lfs.symlinkattributes (filepath [, aname])</code></strong></dt>
229 <dd>Identical to <a href="#attributes">lfs.attributes</a> except that 236 <dd>Identical to <a href="#attributes">lfs.attributes</a> except that
230 it obtains information about the link itself (not the file it refers to). 237 it obtains information about the link itself (not the file it refers to).
231 This function is not available in Windows so you may want to make sure that 238 On Windows this function does not yet support links, and is identical to
232 <code>lfs.symlinkattributes</code> exists before using it. 239 <code>lfs.attributes</code>.
233 </dd> 240 </dd>
234 241
235 <dt><a name="touch"></a><strong><code>lfs.touch (filepath [, atime [, mtime]])</code></strong></dt> 242 <dt><a name="touch"></a><strong><code>lfs.touch (filepath [, atime [, mtime]])</code></strong></dt>