diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/manual.html')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/manual.html | 65 |
1 files changed, 40 insertions, 25 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/manual.html b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/manual.html index 1409c404b1a..3555e3db4dd 100644 --- a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/manual.html +++ b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/manual.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>LuaFileSystem</title> - <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/> + <link rel="stylesheet" href="doc.css" type="text/css"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> @@ -13,7 +13,9 @@ <div id="product"> <div id="product_logo"> - <a href="http://www.keplerproject.org"><img alt="LuaFileSystem" src="luafilesystem.png"/></a> + <a href="http://keplerproject.github.io/luafilesystem"> + <img alt="LuaFileSystem" src="luafilesystem.png"/> + </a> </div> <div id="product_name"><big><strong>LuaFileSystem</strong></big></div> <div id="product_description">File System Library for the Lua Programming Language</div> @@ -31,7 +33,6 @@ <li><a href="index.html#download">Download</a></li> <li><a href="index.html#history">History</a></li> <li><a href="index.html#credits">Credits</a></li> - <li><a href="index.html#contact">Contact us</a></li> </ul> </li> <li><strong>Manual</strong> @@ -43,10 +44,10 @@ </ul> </li> <li><a href="examples.html">Examples</a></li> - <li><a href="http://luaforge.net/projects/luafilesystem/">Project</a> + <li><a href="https://github.com/keplerproject/luafilesystem">Project</a> <ul> - <li><a href="http://luaforge.net/tracker/?group_id=66">Bug Tracker</a></li> - <li><a href="http://luaforge.net/scm/?group_id=66">CVS</a></li> + <li><a href="https://github.com/keplerproject/luafilesystem/issues">Bug Tracker</a></li> + <li><a href="https://github.com/keplerproject/luafilesystem">Git</a></li> </ul> </li> <li><a href="license.html">License</a></li> @@ -101,14 +102,15 @@ LuaFileSystem offers the following functions: </p> <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 - <code>filepath</code> (or <code>nil</code> followed by an error message + <code>filepath</code> (or <code>nil</code> followed by an error message and a system-dependent error code 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 - <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.). + 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; attribute <code>mode</code> is a string, all the others are numbers, and the time related attributes use the same time reference of @@ -152,6 +154,9 @@ LuaFileSystem offers the following functions: <dt><strong><code>size</code></strong></dt> <dd>file size, in bytes</dd> + <dt><strong><code>permissions</code></strong></dt> + <dd>file permissions string</dd> + <dt><strong><code>blocks</code></strong></dt> <dd>block allocated for file; (Unix only)</dd> @@ -172,9 +177,9 @@ LuaFileSystem offers the following functions: Returns <code>true</code> in case of success or <code>nil</code> plus an 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 - exist and returns the lock. If the lock already exists checks it + exist and returns the lock. If the lock already exists checks if it's stale, using the second parameter (default for the second parameter is <code>INT_MAX</code>, which in practice means the lock will never be stale. To free the the lock call <code>lock:free()</code>. <br/> @@ -182,7 +187,7 @@ LuaFileSystem offers the following functions: particular, if the lock exists and is not stale it returns the "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> plus an error string.</dd> @@ -206,30 +211,41 @@ LuaFileSystem offers the following functions: Returns <code>true</code> if the operation was successful; in case of error, it returns <code>nil</code> plus an error string. </dd> + + <dt><a name="link"></a><strong><code>lfs.link (old, new[, symlink])</code></strong></dt> + <dd>Creates a link. The first argument is the object to link to + and the second is the name of the link. If the optional third + argument is true, the link will by a symbolic link (by default, a + hard link is created). + </dd> <dt><a name="mkdir"></a><strong><code>lfs.mkdir (dirname)</code></strong></dt> <dd>Creates a new directory. The argument is the name of the new directory.<br /> - Returns <code>true</code> if the operation was successful; - in case of error, it returns <code>nil</code> plus an error string. + Returns <code>true</code> in case of success or <code>nil</code>, an error message and + a system-dependent error code in case of error. </dd> <dt><a name="rmdir"></a><strong><code>lfs.rmdir (dirname)</code></strong></dt> <dd>Removes an existing directory. The argument is the name of the directory.<br /> - Returns <code>true</code> if the operation was successful; - in case of error, it returns <code>nil</code> plus an error string.</dd> + Returns <code>true</code> in case of success or <code>nil</code>, an error message and + a system-dependent error code in case of error. <dt><a name="setmode"></a><strong><code>lfs.setmode (file, mode)</code></strong></dt> - <dd>Sets the writing mode for a file. The mode string can be either <code>binary</code> or <code>text</code>. - Returns the previous mode string for the file. This function is only available in Windows, so you may want to make sure that - <code>lfs.setmode</code> exists before using it. + <dd>Sets the writing mode for a file. The mode string can be either <code>"binary"</code> or <code>"text"</code>. + Returns <code>true</code> followed the previous mode string for the file, or + <code>nil</code> followed by an error string in case of errors. + On non-Windows platforms, where the two modes are identical, + setting the mode has no effect, and the mode is always returned as <code>binary</code>. </dd> <dt><a name="symlinkattributes"></a><strong><code>lfs.symlinkattributes (filepath [, aname])</code></strong></dt> <dd>Identical to <a href="#attributes">lfs.attributes</a> except that it obtains information about the link itself (not the file it refers to). - This function is not available in Windows so you may want to make sure that - <code>lfs.symlinkattributes</code> exists before using it. + It also adds a <strong><code>target</code></strong> field, containing + the file name that the symlink points to. + On Windows this function does not yet support links, and is identical to + <code>lfs.attributes</code>. </dd> <dt><a name="touch"></a><strong><code>lfs.touch (filepath [, atime [, mtime]])</code></strong></dt> @@ -241,8 +257,8 @@ LuaFileSystem offers the following functions: Lua standard function <code>os.time</code>). If the modification time is omitted, the access time provided is used; if both times are omitted, the current time is used.<br /> - Returns <code>true</code> if the operation was successful; - in case of error, it returns <code>nil</code> plus an error string. + Returns <code>true</code> in case of success or <code>nil</code>, an error message and + a system-dependent error code in case of error. </dd> <dt><a name="unlock"></a><strong><code>lfs.unlock (filehandle[, start[, length]])</code></strong></dt> @@ -262,7 +278,6 @@ LuaFileSystem offers the following functions: <div id="about"> <p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p> - <p><small>$Id: manual.html,v 1.45 2009/06/03 20:53:55 mascarenhas Exp $</small></p> </div> <!-- id="about" --> </div> <!-- id="container" --> |