Sync docs with master branch

This commit is contained in:
Peter Melnichenko
2016-06-30 21:21:39 +03:00
parent 83a811bb8e
commit 138bf12304

View File

@@ -102,14 +102,15 @@ LuaFileSystem offers the following functions:
</p> </p>
<dl class="reference"> <dl class="reference">
<dt><a name="attributes"></a><strong><code>lfs.attributes (filepath [, aname])</code></strong></dt> <dt><a name="attributes"></a><strong><code>lfs.attributes (filepath [, aname | atable])</code></strong></dt>
<dd>Returns a table with the file attributes corresponding to <dd>Returns a table with the file attributes corresponding to
<code>filepath</code> (or <code>nil</code> followed by an error message <code>filepath</code> (or <code>nil</code> followed by an error message
in case of error). in case of error).
If the second optional argument is given, then only the value of the If the second optional argument is given and is a string, then only the value of the
named attribute is returned (this use is equivalent to named attribute is returned (this use is equivalent to
<code>lfs.attributes(filepath).aname</code>, but the table is not created <code>lfs.attributes(filepath)[aname]</code>, but the table is not created
and only one attribute is retrieved from the O.S.). and only one attribute is retrieved from the O.S.).
if a table is passed as the second argument, it is filled with attributes and returned instead of a new table.
The attributes are described as follows; The attributes are described as follows;
attribute <code>mode</code> is a string, all the others are numbers, attribute <code>mode</code> is a string, all the others are numbers,
and the time related attributes use the same time reference of and the time related attributes use the same time reference of
@@ -176,7 +177,7 @@ LuaFileSystem offers the following functions:
Returns <code>true</code> in case of success or <code>nil</code> plus an Returns <code>true</code> in case of success or <code>nil</code> plus an
error string.</dd> error string.</dd>
<dt><a name="chdir"></a><strong><code>lfs.lock_dir(path, [seconds_stale])</code></strong></dt> <dt><a name="lock_dir"></a><strong><code>lfs.lock_dir(path, [seconds_stale])</code></strong></dt>
<dd>Creates a lockfile (called lockfile.lfs) in <code>path</code> if it does not <dd>Creates a lockfile (called lockfile.lfs) in <code>path</code> if it does not
exist and returns the lock. If the lock already exists checks if exist and returns the lock. If the lock already exists checks if
it's stale, using the second parameter (default for the second it's stale, using the second parameter (default for the second
@@ -186,7 +187,7 @@ LuaFileSystem offers the following functions:
particular, if the lock exists and is not stale it returns the particular, if the lock exists and is not stale it returns the
"File exists" message.</dd> "File exists" message.</dd>
<dt><a name="getcwd"></a><strong><code>lfs.currentdir ()</code></strong></dt> <dt><a name="currentdir"></a><strong><code>lfs.currentdir ()</code></strong></dt>
<dd>Returns a string with the current working directory or <code>nil</code> <dd>Returns a string with the current working directory or <code>nil</code>
plus an error string.</dd> plus an error string.</dd>