summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luafilesystem/doc/us')
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/doc.css209
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/examples.html14
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/index.html90
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/license.html16
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/manual.html65
5 files changed, 321 insertions, 73 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/doc.css b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/doc.css
new file mode 100644
index 00000000000..f233ce4f089
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/doc.css
@@ -0,0 +1,209 @@
+body {
+ color: #47555c;
+ font-size: 16px;
+ font-family: "Open Sans", sans-serif;
+ margin: 0;
+ padding: 0;
+ background: #eff4ff;
+}
+
+a:link { color: #008fee; }
+a:visited { color: #008fee; }
+a:hover { color: #22a7ff; }
+
+h1 { font-size:26px; }
+h2 { font-size:24px; }
+h3 { font-size:18px; }
+h4 { font-size:16px; }
+
+hr {
+ height: 1px;
+ background: #c1cce4;
+ border: 0px;
+ margin: 20px 0;
+}
+
+code {
+ font-family: "Open Sans Mono", "Andale Mono", monospace;
+}
+
+tt {
+ font-family: "Open Sans Mono", "Andale Mono", monospace;
+}
+
+body, td, th {
+}
+
+textarea, pre, tt {
+ font-family: "Open Sans Mono", "Andale Mono", monospace;
+}
+
+img {
+ border-width: 0px;
+}
+
+.example {
+ background-color: #323744;
+ color: white;
+ font-size: 16px;
+ padding: 16px 24px;
+ border-radius: 2px;
+}
+
+div.header, div.footer {
+}
+
+#container {
+}
+
+#product {
+ background-color: white;
+ padding: 10px;
+ height: 130px;
+ border-bottom: solid #d3dbec 1px;
+}
+
+#product big {
+ font-size: 42px;
+}
+#product strong {
+ font-weight: normal;
+}
+
+#product_logo {
+ float: right;
+}
+
+#product_name {
+ padding-top: 15px;
+ padding-left: 30px;
+ font-size: 42px;
+ font-weight: normal;
+}
+
+#product_description {
+ padding-left: 30px;
+ color: #757779;
+}
+
+#main {
+ background: #eff4ff;
+ margin: 0;
+}
+
+#navigation {
+ width: 100%;
+ background-color: rgb(44,62,103);
+ padding: 10px;
+ margin: 0;
+}
+
+#navigation h1 {
+ display: none;
+}
+
+#navigation a:hover {
+ text-decoration: underline;
+}
+
+#navigation ul li a {
+ color: rgb(136, 208, 255);
+ font-weight: bold;
+ text-decoration: none;
+}
+
+#navigation ul li li a {
+ color: rgb(136, 208, 255);
+ font-weight: normal;
+ text-decoration: none;
+}
+
+#navigation ul {
+ display: inline;
+ color: white;
+ padding: 0px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+}
+
+#navigation li {
+ display: inline;
+ list-style-type: none;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+#navigation li {
+ padding: 10px;
+ padding: 10px;
+}
+
+#navigation li li {
+}
+
+#navigation li:hover a {
+ color: rgb(166, 238, 255);
+}
+
+#content {
+ padding: 20px;
+ width: 800px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+#about {
+ display: none;
+}
+
+dl.reference {
+ background-color: white;
+ padding: 20px;
+ border: solid #d3dbec 1px;
+}
+
+dl.reference dt {
+ padding: 5px;
+ padding-top: 25px;
+ color: #637bbc;
+}
+
+dl.reference dl dt {
+ padding-top: 5px;
+ color: #637383;
+}
+
+dl.reference dd {
+}
+
+@media print {
+ body {
+ font: 10pt "Times New Roman", "TimeNR", Times, serif;
+ }
+ a {
+ font-weight:bold; color: #004080; text-decoration: underline;
+ }
+ #main {
+ background-color: #ffffff; border-left: 0px;
+ }
+ #container {
+ margin-left: 2%; margin-right: 2%; background-color: #ffffff;
+ }
+ #content {
+ margin-left: 0px; padding: 1em; border-left: 0px; border-right: 0px; background-color: #ffffff;
+ }
+ #navigation {
+ display: none;
+ }
+ #product_logo {
+ display: none;
+ }
+ #about img {
+ display: none;
+ }
+ .example {
+ font-family: "Andale Mono", monospace;
+ font-size: 8pt;
+ page-break-inside: avoid;
+ }
+}
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/examples.html b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/examples.html
index 746df62b4e5..68756c8b1d4 100644
--- a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/examples.html
+++ b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/examples.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,7 @@
<div id="product">
<div id="product_logo">
- <a href="http://www.keplerproject.org">
+ <a href="http://keplerproject.github.io/luafilesystem">
<img alt="LuaFileSystem" src="luafilesystem.png"/>
</a>
</div>
@@ -33,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><a href="manual.html">Manual</a>
@@ -45,10 +44,10 @@
</ul>
</li>
<li><strong>Examples</strong></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>
@@ -65,7 +64,7 @@
attributes for each file inside it.</p>
<pre class="example">
-require"lfs"
+local lfs = require"lfs"
function attrdir (path)
for file in lfs.dir(path) do
@@ -94,7 +93,6 @@ attrdir (".")
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p>
- <p><small>$Id: examples.html,v 1.8 2007/12/14 15:28:04 carregal Exp $</small></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/index.html b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/index.html
index 43edefc5a1b..195ab60e75a 100644
--- a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/index.html
+++ b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/index.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,7 @@
<div id="product">
<div id="product_logo">
- <a href="http://www.keplerproject.org">
+ <a href="http://keplerproject.github.io/luafilesystem">
<img alt="LuaFileSystem" src="luafilesystem.png"/>
</a>
</div>
@@ -33,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><a href="manual.html">Manual</a>
@@ -45,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>
@@ -67,31 +66,70 @@ systems offered by the standard Lua distribution.</p>
the underlying directory structure and file attributes.</p>
<p>LuaFileSystem is free software and uses the same
-<a href="license.html">license</a> as Lua 5.1.</p>
+<a href="license.html">license</a> as Lua 5.x (MIT).</p>
<h2><a name="status"></a>Status</h2>
-<p>Current version is 1.5.0. It was developed for Lua 5.1.</p>
+<p>Current version is 1.7.0. It works with Lua 5.1, 5.2 and 5.3, and it runs on various
+flavors of Unix (including Linux, BSDs, macOS) and Windows.</p>
<h2><a name="download"></a>Download</h2>
-<p>LuaFileSystem source can be downloaded from its
-<a href="http://github.com/keplerproject/luafilesystem">Github</a>
-page.</p>
+<p>LuaFileSystem can be installed using <a href="https://luarocks.org">LuaRocks</a>:
+
+<pre class="example">
+$ luarocks install luafilesystem
+</pre>
+
+<p>Its source can be found at its <a href="http://github.com/keplerproject/luafilesystem">Github</a> page.</p>
<h2><a name="history"></a>History</h2>
<dl class="history">
+ <dt><strong>Version 1.7.0</strong> [15/Sep/2017]</dt>
+ <dd><ul>
+ <li>symlinkattributes function now provides 'target' field, containing name of the file that the symlink points to.</li>
+ <li>attributes, symlinkattributes, touch, mkdir, and rmdir functions now return system-dependent error code as the third value on error.</li>
+ <li>Fixed detection of closed files for Lua 5.2+ in setmode, lock, and unlock functions.</li>
+ <li>Fixed various compiler warnings.</li>
+ </ul></dd>
+
+ <dt><strong>Version 1.6.3</strong> [15/Jan/2015]</dt>
+ <dd><ul>
+ <li>Lua 5.3 support.</li>
+ <li>Assorted bugfixes.</li>
+ </ul></dd>
+
+ <dt><strong>Version 1.6.2</strong> [??/Oct/2012]</dt>
+ <dd><ul>
+ <li>Full Lua 5.2 compatibility (with Lua 5.1 fallbacks)</li>
+ </ul></dd>
+
+ <dt><strong>Version 1.6.1</strong> [01/Oct/2012]</dt>
+ <dd><ul>
+ <li>fix build for Lua 5.2</li>
+ </ul></dd>
+
+ <dt><strong>Version 1.6.0</strong> [26/Sep/2012]</dt>
+ <dd><ul>
+ <li>getcwd fix for Android</li>
+ <li>support for Lua 5.2</li>
+ <li>add lfs.link</li>
+ <li>other bug fixes</li>
+ </ul></dd>
+
<dt><strong>Version 1.5.0</strong> [20/Oct/2009]</dt>
+ <dd><ul>
<li>Added explicit next and close methods to second return value of lfs.dir
(the directory object), for explicit iteration or explicit closing.</li>
<li>Added directory locking via lfs.lock_dir function (see the <a href="manual.html">manual</a>).</li>
+ </ul></dd>
<dt><strong>Version 1.4.2</strong> [03/Feb/2009]</dt>
<dd>
<ul>
- <li>fixed bug [<a href="http://luaforge.net/tracker/?func=detail&amp;group_id=66&amp;aid=13198&amp;atid=356">#13198</a>]
- lfs.attributes(filename, 'size') overflow on files > 2 Gb again (bug report and patch by KUBO Takehiro).</li>
- <li>fixed bug [<a href="http://luaforge.net/tracker/?group_id=66&amp;atid=356&amp;func=detail&amp;aid=39794">#39794</a>]
+ <li>fixed bug
+ <code>lfs.attributes(filename, 'size')</code> overflow on files > 2 Gb again (bug report and patch by KUBO Takehiro).</li>
+ <li>fixed bug
Compile error on Solaris 10 (bug report and patch by Aaron B).</li>
<li>fixed compilation problems with Borland C.</li>
</ul>
@@ -103,7 +141,7 @@ page.</p>
<li>documentation review</li>
<li>fixed Windows compilation issues</li>
<li>fixed bug in the Windows tests (patch by Shmuel Zeigerman)</li>
- <li>fixed bug [<a href="http://luaforge.net/tracker/?func=detail&amp;group_id=66&amp;aid=2185&amp;atid=356">#2185</a>]
+ <li>fixed bug
<code>lfs.attributes(filename, 'size')</code> overflow on files > 2 Gb
</li>
</ul>
@@ -120,7 +158,7 @@ page.</p>
</ul>
</dd>
- <dt><strong><a href="http://www.keplerproject.org/luafilesystem/1.3/">Version 1.3.0</a></strong> [26/Oct/2007]</dt>
+ <dt><strong>Version 1.3.0</strong> [26/Oct/2007]</dt>
<dd>
<ul>
<li>added function
@@ -129,14 +167,14 @@ page.</p>
</ul>
</dd>
- <dt><strong><a href="http://www.keplerproject.org/luafilesystem/1.2/">Version 1.2.1</a></strong> [08/May/2007]</dt>
+ <dt><strong>Version 1.2.1</strong> [08/May/2007]</dt>
<dd>
<ul>
<li>compatible only with Lua 5.1 (Lua 5.0 support was dropped)</li>
</ul>
</dd>
- <dt><strong><a href="http://www.keplerproject.org/luafilesystem/1.2/">Version 1.2</a></strong> [15/Mar/2006]</dt>
+ <dt><strong>Version 1.2</strong> [15/Mar/2006]</dt>
<dd>
<ul>
<li>added optional argument to
@@ -147,14 +185,14 @@ page.</p>
</ul>
</dd>
- <dt><strong><a href="http://www.keplerproject.org/luafilesystem/1.1/">Version 1.1</a></strong> [30/May/2005]</dt>
+ <dt><strong>Version 1.1</strong> [30/May/2005]</dt>
<dd>
<ul>
<li>added function <a href="manual.html#touch"><code>lfs.touch</code></a>.</li>
</ul>
</dd>
- <dt><strong><a href="http://www.keplerproject.org/luafilesystem/1.0/">Version 1.0</a></strong> [21/Jan/2005]</dt>
+ <dt><strong>Version 1.0</strong> [21/Jan/2005]</dt>
<dd />
<dt><strong>Version 1.0 Beta</strong> [10/Nov/2004]</dt>
@@ -165,25 +203,15 @@ page.</p>
<p>LuaFileSystem was designed by Roberto Ierusalimschy,
Andr&eacute; Carregal and Tom&aacute;s Guisasola as part of the
-<a href="http://www.keplerproject.org">Kepler Project</a>,
+<a href="https://github.com/keplerproject">Kepler Project</a>,
which holds its copyright. LuaFileSystem is currently maintained by F&aacute;bio Mascarenhas.</p>
-<h2><a name="contact"></a>Contact us</h2>
-
-<p>For more information please
-<a href="mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us</a>.
-Comments are welcome!</p>
-
-<p>You can also reach other Kepler developers and users on the Kepler Project
-<a href="http://luaforge.net/mail/?group_id=104">mailing list</a>.</p>
-
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p>
- <p><small>$Id: index.html,v 1.44 2009/02/04 21:21:33 carregal Exp $</small></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/license.html b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/license.html
index 4ecad4bd7bb..4f828cf1467 100644
--- a/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/license.html
+++ b/Build/source/texk/web2c/luatexdir/luafilesystem/doc/us/license.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,7 @@
<div id="product">
<div id="product_logo">
- <a href="http://www.keplerproject.org">
+ <a href="http://keplerproject.github.io/luafilesystem">
<img alt="LuaFileSystem" src="luafilesystem.png"/>
</a>
</div>
@@ -33,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><a href="manual.html">Manual</a>
@@ -45,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><strong>License</strong></li>
@@ -69,7 +68,7 @@ software.
Its licenses are compatible with
<a href="http://www.gnu.org/licenses/gpl.html">GPL</a>.
LuaFileSystem is not in the public domain and the
-<a href="http://www.keplerproject.org">Kepler Project</a>
+<a href="https://github.com/keplerproject">Kepler Project</a>
keep its copyright.
The legal details are below.
</p>
@@ -85,7 +84,7 @@ Ierusalimschy, Andr&eacute; Carregal and Tom&aacute;s Guisasola.
The implementation is not derived from licensed software.</p>
<hr/>
-<p>Copyright &copy; 2003 Kepler Project.</p>
+<p>Copyright &copy; 2003 - 2017 Kepler Project.</p>
<p>Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@@ -113,7 +112,6 @@ SOFTWARE.</p>
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p>
- <p><small>$Id: license.html,v 1.13 2008/02/11 22:42:21 carregal Exp $</small></p>
</div><!-- id="about" -->
</div><!-- id="container" -->
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" -->