mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-24 12:23:08 +00:00
HTML Tidying
This commit is contained in:
@@ -1,140 +1,122 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||||
<title>LuaFileSystem</title>
|
<title>LuaFileSystem</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
ul { list-style-type: disc };
|
ul { list-style-type: disc };
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body bgcolor="#FFFFFF">
|
<body bgcolor="#FFFFFF">
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<table border=0 cellspacing=2 cellpadding=2>
|
<table border="0" cellspacing="2" cellpadding="2">
|
||||||
<tr><td align=center><a href="http://www.keplerproject.org">
|
<tr>
|
||||||
<img border=0 alt="LuaFileSystem" src="luafilesystem.png"></a>
|
<td align="center"><a href="http://www.keplerproject.org"><img
|
||||||
<tr><td align=center><big><b>LuaFileSystem</b></big>
|
border="0" alt="LuaFileSystem" src="luafilesystem.png"></a> </td>
|
||||||
<tr><td align=center valign=top>File System Library for the
|
</tr>
|
||||||
<a href="http://www.lua.org">Lua</a>
|
|
||||||
Programming Language
|
<tr>
|
||||||
|
<td align="center"><big><b>LuaFileSystem</b></big> </td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top">File System Library for the <a
|
||||||
|
href="http://www.lua.org">Lua</a> Programming Language</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</center>
|
</center>
|
||||||
<p>
|
|
||||||
|
|
||||||
<center><small>
|
<center><small><a href="#over">overview</a> · <a href=
|
||||||
<a href="#over">overview</a> ·
|
"#download">download</a> · <a href="manual.html">manual</a>
|
||||||
<a href="#download">download</a> ·
|
· <a href="#credits">credits</a> · <a href=
|
||||||
<a href="manual.html">manual</a> ·
|
"#contact">contact us</a></small></center>
|
||||||
<a href="#credits">credits</a> ·
|
|
||||||
<a href="#contact">contact us</a>
|
|
||||||
</small></center>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<h2>Contents</h2>
|
<h2>Contents</h2>
|
||||||
<p>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li> <a href="#over">Overview</a>
|
<li><a href="#over">Overview</a></li>
|
||||||
<li> <a href="#version">Current Version</a>
|
|
||||||
<li> <a href="#download">Download</a>
|
<li><a href="#version">Current Version</a></li>
|
||||||
<li> <a href="#manual">Manual</a>
|
|
||||||
<li> <a href="#credits">Credits</a>
|
<li><a href="#download">Download</a></li>
|
||||||
<li> <a href="#contact">Contact us</a>
|
|
||||||
|
<li><a href="#manual">Manual</a></li>
|
||||||
|
|
||||||
|
<li><a href="#credits">Credits</a></li>
|
||||||
|
|
||||||
|
<li><a href="#contact">Contact us</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="over"></a>
|
<a name="over"></a>
|
||||||
|
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<p>
|
|
||||||
LuaFileSystem is a library developed to complement the set of functions
|
|
||||||
related to file systems offered by the standard Lua distribution.
|
|
||||||
One of its goals is to be as portable as Lua.
|
|
||||||
<p>
|
|
||||||
LuaFileSystem is free software and uses the same
|
|
||||||
<a href="license.html">license</a>
|
|
||||||
as Lua 5.0.
|
|
||||||
|
|
||||||
|
<p>LuaFileSystem is a library developed to complement the set of
|
||||||
|
functions related to file systems offered by the standard Lua
|
||||||
|
distribution. One of its goals is to be as portable as Lua.</p>
|
||||||
|
|
||||||
|
<p>LuaFileSystem is free software and uses the same <a href=
|
||||||
|
"license.html">license</a> as Lua 5.0. <a name="version"></a></p>
|
||||||
|
|
||||||
<a name="version"></a>
|
|
||||||
<h2>Current version</h2>
|
<h2>Current version</h2>
|
||||||
<p>
|
|
||||||
Current version is 1.0 beta.
|
|
||||||
It was developed for Lua 5.0.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Version 1.0 follows the
|
|
||||||
<a href="http://www.keplerproject.org/compat">package proposal</a>
|
|
||||||
for Lua 5.1
|
|
||||||
(see section <a href="#installation">Installation</a> for more details).
|
|
||||||
|
|
||||||
|
<p>Current version is 1.0 beta. It was developed for Lua 5.0.</p>
|
||||||
|
|
||||||
|
<p>Version 1.0 follows the <a href=
|
||||||
|
"http://www.keplerproject.org/compat">package proposal</a> for Lua
|
||||||
|
5.1 (see section <a href="#installation">Installation</a> for more
|
||||||
|
details). <a name="download"></a></p>
|
||||||
|
|
||||||
<a name="download"></a>
|
|
||||||
<h2>Download</h2>
|
<h2>Download</h2>
|
||||||
<p>
|
|
||||||
LuaFileSystem can be downloaded from its
|
|
||||||
<a href="http://luaforge.net/project/showfiles.php?group_id=66">Lua Forge</a>
|
|
||||||
page.
|
|
||||||
|
|
||||||
|
<p>LuaFileSystem can be downloaded from its <a href=
|
||||||
|
"http://luaforge.net/project/showfiles.php?group_id=66">Lua
|
||||||
|
Forge</a> page. <a name="new"></a></p>
|
||||||
|
|
||||||
<a name="new"></a>
|
|
||||||
<h2>What's new</h2>
|
<h2>What's new</h2>
|
||||||
<p>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>[10/nov/2004] Version 1.0 beta released
|
<li>[10/nov/2004] Version 1.0 beta released</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<a name="installation"></a>
|
||||||
|
|
||||||
<a name="installation"></a>
|
|
||||||
<h2>Installation</h2>
|
<h2>Installation</h2>
|
||||||
<p>
|
|
||||||
LuaFileSystem is distributed as a pair of C source and header files.
|
|
||||||
The distribution provides a <tt>Makefile</tt> prepared to compile the
|
|
||||||
library and install it.
|
|
||||||
The file <tt>config</tt> should be edited to suit the needs of the aimed
|
|
||||||
platform.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
LuaFileSystem follows the
|
|
||||||
<a href="http://www.keplerproject.org/compat">package proposal</a>
|
|
||||||
for Lua 5.1,
|
|
||||||
therefore this package should be "installed".
|
|
||||||
In other words,
|
|
||||||
if you are using Lua 5.0,
|
|
||||||
the files <tt>compat-5.1.c</tt> and <tt>compat-5.1.h</tt> must be used
|
|
||||||
in the compilation and the file <tt>compat-5.1.lua</tt> must be installed
|
|
||||||
in the <tt>LUA_PATH</tt>.
|
|
||||||
If you are using Lua 5.1,
|
|
||||||
nothing should be done.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
<p>LuaFileSystem is distributed as a pair of C source and header
|
||||||
|
files. The distribution provides a <tt>Makefile</tt> prepared to
|
||||||
|
compile the library and install it. The file <tt>config</tt> should
|
||||||
|
be edited to suit the needs of the aimed platform.</p>
|
||||||
|
|
||||||
|
<p>LuaFileSystem follows the <a href=
|
||||||
|
"http://www.keplerproject.org/compat">package proposal</a> for Lua
|
||||||
|
5.1, therefore this package should be "installed". In other words,
|
||||||
|
if you are using Lua 5.0, the files <tt>compat-5.1.c</tt> and
|
||||||
|
<tt>compat-5.1.h</tt> must be used in the compilation and the file
|
||||||
|
<tt>compat-5.1.lua</tt> must be installed in the <tt>LUA_PATH</tt>.
|
||||||
|
If you are using Lua 5.1, nothing should be done.</p>
|
||||||
|
|
||||||
|
<a name="credits"></a>
|
||||||
|
|
||||||
<a name="credits"></a>
|
|
||||||
<h2>Credits</h2>
|
<h2>Credits</h2>
|
||||||
|
|
||||||
<p>
|
<p>LuaFileSystem was designed by Roberto Ierusalimschy,
|
||||||
LuaFileSystem was designed by Roberto Ierusalimschy,
|
André Carregal and Tomás Guisasola as part of <a
|
||||||
André Carregal and Tomás Guisasola as part of
|
href="http://www.keplerproject.org">The Kepler Project</a> which
|
||||||
<a href="http://www.keplerproject.org">The Kepler Project</a>
|
holds its copyright.</p>
|
||||||
which holds its copyright.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
<a name="contact"></a>
|
||||||
|
|
||||||
<a name="contact"></a>
|
|
||||||
<h2>Contact us</h2>
|
<h2>Contact us</h2>
|
||||||
|
|
||||||
<p>
|
<p>For more information please <a href=
|
||||||
For more information please
|
"mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us</a>.
|
||||||
<a href="mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us</a>.
|
Comments are welcome!</p>
|
||||||
Comments are welcome!
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<hr>
|
<hr>
|
||||||
<small>
|
<small>$Id: index.html,v 1.6 2004/11/11 15:33:20 tomas Exp
|
||||||
$Id: index.html,v 1.6 2004/11/11 15:33:20 tomas Exp $
|
$</small>
|
||||||
</small>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -1,78 +1,68 @@
|
|||||||
<! See Copyright Notice at the end of this file>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||||
<HTML>
|
<html>
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>LuaFileSystem: license</TITLE>
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||||
</HEAD>
|
<title>LuaFileSystem: license</title>
|
||||||
|
</head>
|
||||||
|
<body bgcolor="#FFFFFF">
|
||||||
|
<hr>
|
||||||
|
<h1>License</h1>
|
||||||
|
|
||||||
<BODY BGCOLOR="#FFFFFF">
|
LuaFileSystem is free software: it can be used for both academic
|
||||||
|
and commercial purposes at absolutely no cost. There are no
|
||||||
|
royalties or GNU-like "copyleft" restrictions. LuaFileSystem
|
||||||
|
qualifies as <a href=
|
||||||
|
"http://www.opensource.org/docs/definition.html">Open Source</a>
|
||||||
|
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 <a href=
|
||||||
|
"http://www.keplerproject.org">The Kepler Project</a> keep its
|
||||||
|
copyright. The legal details are below.
|
||||||
|
|
||||||
<HR>
|
<p>The spirit of the license is that you are free to use
|
||||||
<H1>
|
LuaFileSystem for any purpose at no cost without having to ask us.
|
||||||
License
|
The only requirement is that if you do use LuaFileSystem, then you
|
||||||
</H1>
|
should give us credit by including the appropriate copyright notice
|
||||||
|
somewhere in your product or its documentation.</p>
|
||||||
|
|
||||||
LuaFileSystem
|
<p>The LuaFileSystem library is designed and implemented by Roberto
|
||||||
is free software:
|
Ierusalimschy, André Carregal and Tomás Guisasola.
|
||||||
it can be used for both academic and commercial purposes at absolutely no cost.
|
The implementation is not derived from licensed software.</p>
|
||||||
There are no royalties or GNU-like "copyleft" restrictions.
|
|
||||||
LuaFileSystem qualifies as
|
|
||||||
<A HREF="http://www.opensource.org/docs/definition.html">Open Source</A>
|
|
||||||
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
|
|
||||||
<a href="http://www.keplerproject.org">The Kepler Project</a>
|
|
||||||
keep its copyright.
|
|
||||||
The legal details are below.
|
|
||||||
<P>
|
|
||||||
|
|
||||||
The spirit of the license is that
|
|
||||||
you are free to use LuaFileSystem for any purpose at no cost without having to ask us.
|
|
||||||
The only requirement is that
|
|
||||||
if you do use LuaFileSystem,
|
|
||||||
then you should give us credit by including the appropriate copyright notice
|
|
||||||
somewhere in your product or its documentation.
|
|
||||||
<P>
|
|
||||||
|
|
||||||
The LuaFileSystem library is designed and implemented
|
|
||||||
by
|
|
||||||
Roberto Ierusalimschy,
|
|
||||||
André Carregal and
|
|
||||||
Tomás Guisasola.
|
|
||||||
The implementation is not derived from licensed software.
|
|
||||||
<P>
|
|
||||||
|
|
||||||
|
<p>
|
||||||
<!-- ===================================================================== -->
|
<!-- ===================================================================== -->
|
||||||
<HR>
|
</p>
|
||||||
Copyright © 2004 The Kepler Project.
|
|
||||||
<P>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
<hr>
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
Copyright © 2004 The Kepler Project.
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
<P>
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
<p>Permission is hereby granted, free of charge, to any person
|
||||||
all copies or substantial portions of the Software.
|
obtaining a copy of this software and associated documentation
|
||||||
<P>
|
files (the "Software"), to deal in the Software without
|
||||||
|
restriction, including without limitation the rights to use, copy,
|
||||||
|
modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:</p>
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
<p>The above copyright notice and this permission notice shall be
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
included in all copies or substantial portions of the Software.</p>
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
<P>
|
|
||||||
|
|
||||||
|
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||||
|
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||||
|
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
<!-- ===================================================================== -->
|
<!-- ===================================================================== -->
|
||||||
<HR>
|
</p>
|
||||||
<SMALL>
|
|
||||||
$Id: license.html,v 1.1 2004/07/27 14:15:24 tomas Exp $
|
<hr>
|
||||||
</SMALL>
|
<small>$Id: license.html,v 1.1.1.1 2004/07/27 14:15:24 tomas Exp
|
||||||
|
$</small>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
@@ -1,133 +1,132 @@
|
|||||||
<! See Copyright Notice in license.html>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||||
<title>LuaFileSystem</title>
|
<title>LuaFileSystem</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
ul { list-style-type: disc };
|
ul { list-style-type: disc };
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body bgcolor="#FFFFFF">
|
<body bgcolor="#FFFFFF">
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<table border=0 cellspacing=2 cellpadding=2>
|
<table border="0" cellspacing="2" cellpadding="2">
|
||||||
<tr><td align=center><a href="http://www.keplerproject.org/luafilesystem">
|
<tr>
|
||||||
<img border=0 alt="LuaFileSystem logo" src="luafilesystem.png"></a>
|
<td align="center"><a href=
|
||||||
<tr><td align=center><big><b>LuaFileSystem Reference Manual</b></big>
|
"http://www.keplerproject.org/luafilesystem"><img border="0" alt=
|
||||||
<tr><td align=center valign=top>File system library for the
|
"LuaFileSystem logo" src="luafilesystem.png"></a> </td>
|
||||||
<a href="http://www.lua.org">Lua</a>
|
</tr>
|
||||||
programming language
|
|
||||||
|
<tr>
|
||||||
|
<td align="center"><big><b>LuaFileSystem Reference Manual</b></big>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top">File system library for the <a
|
||||||
|
href="http://www.lua.org">Lua</a> programming language</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</center>
|
</center>
|
||||||
<p>
|
|
||||||
|
|
||||||
<center><small>
|
<center><small><a href="index.html">home</a> · <a href=
|
||||||
<a href="index.html">home</a> ·
|
"#introduction">introduction</a> · <a href=
|
||||||
<a href="#introduction">introduction</a> ·
|
"#reference">reference</a> · <a href=
|
||||||
<a href="#reference">reference</a> ·
|
"#example">example</a></small></center>
|
||||||
<a href="#example">example</a>
|
|
||||||
</small></center>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
<a name="introduction"></a>
|
||||||
|
|
||||||
<a name="introduction"></a>
|
|
||||||
<h2>Introduction</h2>
|
<h2>Introduction</h2>
|
||||||
|
|
||||||
<p>
|
<p>LuaFileSystem is a <a href="http://www.lua.org">Lua</a> library
|
||||||
LuaFileSystem is a <a href="http://www.lua.org">Lua</a> library
|
developed to complement the set of functions related to file
|
||||||
developed to complement the set of functions related to file systems offered
|
systems offered by the standard Lua distribution.</p>
|
||||||
by the standard Lua distribution.
|
|
||||||
<p>
|
|
||||||
LuaFileSystem is free software and uses the same
|
|
||||||
<a href="license.html">license</a>
|
|
||||||
as Lua 5.0.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
<p>LuaFileSystem is free software and uses the same <a href=
|
||||||
|
"license.html">license</a> as Lua 5.0.</p>
|
||||||
|
|
||||||
|
<a name="reference"></a>
|
||||||
|
|
||||||
<a name="reference"></a>
|
|
||||||
<h2>Reference</h2>
|
<h2>Reference</h2>
|
||||||
|
|
||||||
<p>
|
<p>LuaFileSystem offers the following functions:</p>
|
||||||
LuaFileSystem offers the following functions:
|
|
||||||
<ul>
|
<ul>
|
||||||
<a name="attributes"></a>
|
<li style="list-style: none"><a name="attributes"></a></li>
|
||||||
<li> <b><tt>lfs.attributes (filepath)</tt></b> <br>
|
|
||||||
Obtains the file attributes.
|
|
||||||
The attributes are:
|
|
||||||
<ul>
|
|
||||||
<i>dev</i>, device inode resides on;<br>
|
|
||||||
<i>ino</i>, inode's number;<br>
|
|
||||||
<i>mode</i>, inode protection mode (<small>values could be
|
|
||||||
<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>
|
|
||||||
<i>nlink</i>, number of hard links to the file;<br>
|
|
||||||
<i>uid</i>, user-id of owner;<br>
|
|
||||||
<i>gid</i>, group-id of owner;<br>
|
|
||||||
<i>rdev</i>, device type, for special file inode;<br>
|
|
||||||
<i>access</i>, time of last access;<br>
|
|
||||||
<i>modification</i>, time of last data modification;<br>
|
|
||||||
<i>change</i>, time of last file status change;<br>
|
|
||||||
<i>size</i>, file size, in bytes;<br>
|
|
||||||
<i>blocks</i>, block allocated for file; (Unix only)<br>
|
|
||||||
<i>blksize</i>, optimal file system I/O blocksize; (Unix only)<br>
|
|
||||||
</ul>
|
|
||||||
Returns a table with file attributes described above.
|
|
||||||
|
|
||||||
<a name="chdir"></a>
|
<li><b><tt>lfs.attributes (filepath)</tt></b><br>
|
||||||
<li> <b><tt>lfs.chdir (path)</tt></b> <br>
|
Obtains the file attributes. The attributes are:
|
||||||
Changes the current working directory to the given <tt>path</tt>.<br>
|
|
||||||
Returns <tt>true</tt> in case of success or <tt>nil</tt> plus an error
|
|
||||||
string.
|
|
||||||
|
|
||||||
<a name="getcwd"></a>
|
<div style="margin-left: 2em"><i>dev</i>, device inode resides
|
||||||
<li> <b><tt>lfs.currentdir ()</tt></b> <br>
|
on;<br>
|
||||||
Returns a string with the current working directory or
|
<i>ino</i>, inode's number;<br>
|
||||||
<code>nil</code> plus an error string.
|
<i>mode</i>, inode protection mode (<small>values could be
|
||||||
|
<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>
|
||||||
|
<i>nlink</i>, number of hard links to the file;<br>
|
||||||
|
<i>uid</i>, user-id of owner;<br>
|
||||||
|
<i>gid</i>, group-id of owner;<br>
|
||||||
|
<i>rdev</i>, device type, for special file inode;<br>
|
||||||
|
<i>access</i>, time of last access;<br>
|
||||||
|
<i>modification</i>, time of last data modification;<br>
|
||||||
|
<i>change</i>, time of last file status change;<br>
|
||||||
|
<i>size</i>, file size, in bytes;<br>
|
||||||
|
<i>blocks</i>, block allocated for file; (Unix only)<br>
|
||||||
|
<i>blksize</i>, optimal file system I/O blocksize; (Unix only)<br>
|
||||||
|
</div>
|
||||||
|
|
||||||
<a name="dir"></a>
|
Returns a table with file attributes described above. <a name=
|
||||||
<li> <b><tt>lfs.dir (path)</tt></b> <br>
|
"chdir"></a></li>
|
||||||
Lua iterator over the entries of a given directory.
|
|
||||||
Raises an error if <tt>path</tt> is not a directory.
|
|
||||||
|
|
||||||
<a name="lock"></a>
|
<li><b><tt>lfs.chdir (path)</tt></b><br>
|
||||||
<li> <b><tt>lfs.lock (filehandle, mode[, start[, length]])</tt></b> <br>
|
Changes the current working directory to the given
|
||||||
Locks a file or a part of it.
|
<tt>path</tt>.<br>
|
||||||
This function works on <em>open files</em>;
|
Returns <tt>true</tt> in case of success or <tt>nil</tt> plus an
|
||||||
the file handle should be specified as the first argument.
|
error string. <a name="getcwd"></a></li>
|
||||||
The string <code>mode</code> could be either <code>r</code> (for a
|
|
||||||
read/shared lock) or <code>w</code> (for a write/exclusive lock).
|
|
||||||
The optional arguments <code>start</code> and <code>length</code> can be
|
|
||||||
used to specify a starting point and its length;
|
|
||||||
both should be numbers.<br>
|
|
||||||
Returns a boolean indicating if the operation was successful;
|
|
||||||
in case of error, it returns <code>false</code> plus an error string.
|
|
||||||
|
|
||||||
<a name="mkdir"></a>
|
<li><b><tt>lfs.currentdir ()</tt></b><br>
|
||||||
<li> <b><tt>lfs.mkdir (dirname)</tt></b> <br>
|
Returns a string with the current working directory or
|
||||||
Creates a new directory.
|
<code>nil</code> plus an error string. <a name="dir"></a></li>
|
||||||
The argument is the name of the new directory.<br>
|
|
||||||
Returns a boolean indicating whether the operation succeeds or not
|
|
||||||
(in this case, an error string is returned too).
|
|
||||||
|
|
||||||
<a name="unlock"></a>
|
<li><b><tt>lfs.dir (path)</tt></b><br>
|
||||||
<li> <b><tt>lfs.unlock (filehandle[, start[, length]])</tt></b> <br>
|
Lua iterator over the entries of a given directory. Raises an
|
||||||
Unlocks a file or a part of it.
|
error if <tt>path</tt> is not a directory. <a name="lock"></a></li>
|
||||||
This function works on <em>open files</em>;
|
|
||||||
the file handle should be specified as the first argument.
|
|
||||||
The optional arguments <code>start</code> and <code>length</code> can be
|
|
||||||
used to specify a starting point and its length;
|
|
||||||
both should be numbers.<br>
|
|
||||||
Returns a boolean indicating if the operation was successful;
|
|
||||||
in case of error, it returns <code>false</code> plus a string describing the
|
|
||||||
error.
|
|
||||||
|
|
||||||
|
<li><b><tt>lfs.lock (filehandle, mode[, start[,
|
||||||
|
length]])</tt></b><br>
|
||||||
|
Locks a file or a part of it. This function works on <em>open
|
||||||
|
files</em>; the file handle should be specified as the first
|
||||||
|
argument. The string <code>mode</code> could be either
|
||||||
|
<code>r</code> (for a read/shared lock) or <code>w</code> (for a
|
||||||
|
write/exclusive lock). The optional arguments <code>start</code>
|
||||||
|
and <code>length</code> can be used to specify a starting point and
|
||||||
|
its length; both should be numbers.<br>
|
||||||
|
Returns a boolean indicating if the operation was successful; in
|
||||||
|
case of error, it returns <code>false</code> plus an error string.
|
||||||
|
<a name="mkdir"></a></li>
|
||||||
|
|
||||||
|
<li><b><tt>lfs.mkdir (dirname)</tt></b><br>
|
||||||
|
Creates a new directory. The argument is the name of the new
|
||||||
|
directory.<br>
|
||||||
|
Returns a boolean indicating whether the operation succeeds or not
|
||||||
|
(in this case, an error string is returned too). <a name=
|
||||||
|
"unlock"></a></li>
|
||||||
|
|
||||||
|
<li><b><tt>lfs.unlock (filehandle[, start[, length]])</tt></b><br>
|
||||||
|
Unlocks a file or a part of it. This function works on <em>open
|
||||||
|
files</em>; the file handle should be specified as the first
|
||||||
|
argument. The optional arguments <code>start</code> and
|
||||||
|
<code>length</code> can be used to specify a starting point and its
|
||||||
|
length; both should be numbers.<br>
|
||||||
|
Returns a boolean indicating if the operation was successful; in
|
||||||
|
case of error, it returns <code>false</code> plus a string
|
||||||
|
describing the error.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<a name="example"></a>
|
||||||
|
|
||||||
<a name="example"></a>
|
|
||||||
<h2>Example</h2>
|
<h2>Example</h2>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
@@ -154,39 +153,45 @@ end
|
|||||||
attrdir (".")
|
attrdir (".")
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<a name="contents"></a>
|
||||||
|
|
||||||
<a name="contents"></a>
|
|
||||||
<h2>Contents</h2>
|
<h2>Contents</h2>
|
||||||
<p>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li> <a href="#introduction">Introduction</a>
|
<li><a href="#introduction">Introduction</a></li>
|
||||||
<li> <a href="#reference">Reference</a>
|
|
||||||
<ul>
|
<li><a href="#reference">Reference</a>
|
||||||
<li> <a href="#chdir">chdir</a>
|
|
||||||
<li> <a href="#currentdir">currentdir</a>
|
<ul>
|
||||||
<li> <a href="#dir">dir</a>
|
<li><a href="#chdir">chdir</a></li>
|
||||||
<li> <a href="#lock">lock</a>
|
|
||||||
<li> <a href="#mkdir">mkdir</a>
|
<li><a href="#currentdir">currentdir</a></li>
|
||||||
<li> <a href="#unlock">unlock</a>
|
|
||||||
</ul>
|
<li><a href="#dir">dir</a></li>
|
||||||
<li> <a href="#examples">Examples</a>
|
|
||||||
|
<li><a href="#lock">lock</a></li>
|
||||||
|
|
||||||
|
<li><a href="#mkdir">mkdir</a></li>
|
||||||
|
|
||||||
|
<li><a href="#unlock">unlock</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</li>
|
||||||
|
|
||||||
|
<li><a href="#examples">Examples</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<p>
|
<br>
|
||||||
<center><small>
|
<br>
|
||||||
<a href="index.html">home</a> ·
|
|
||||||
<a href="#introduction">introduction</a> ·
|
|
||||||
<a href="#reference">reference</a> ·
|
<center><small><a href="index.html">home</a> · <a href=
|
||||||
<a href="#example">example</a>
|
"#introduction">introduction</a> · <a href=
|
||||||
</small></center>
|
"#reference">reference</a> · <a href=
|
||||||
<p>
|
"#example">example</a></small></center>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<small>
|
<small>$Id: manual.html,v 1.7 2004/11/10 14:09:45 tuler Exp
|
||||||
$Id: manual.html,v 1.7 2004/11/10 14:09:45 tuler Exp $
|
$</small>
|
||||||
</small>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user