mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-23 19:43:06 +00:00
Acrescimo de exemplo.
Acrescimo do logo.
This commit is contained in:
BIN
doc/us/luafilesystem.png
Normal file
BIN
doc/us/luafilesystem.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
@@ -110,6 +110,30 @@ LuaFileSystem offers the following functions:
|
||||
<a name="example"></a>
|
||||
<h2>Example</h2>
|
||||
|
||||
<pre>
|
||||
require"lfs"
|
||||
|
||||
function attrdir (path)
|
||||
for file in lfs.dir(path) do
|
||||
if file ~= "." and file ~= ".." then
|
||||
local f = path..'/'..file
|
||||
print ("\t "..f)
|
||||
local attr = lfs.attributes (f)
|
||||
assert (type(attr) == "table")
|
||||
if attr.mode == "directory" then
|
||||
attrdir (f)
|
||||
else
|
||||
for name, value in pairs(attr) do
|
||||
print (name, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
attrdir (".")
|
||||
</pre>
|
||||
|
||||
|
||||
<a name="contents"></a>
|
||||
<h2>Contents</h2>
|
||||
@@ -141,7 +165,7 @@ LuaFileSystem offers the following functions:
|
||||
|
||||
<hr>
|
||||
<small>
|
||||
$Id: manual.html,v 1.3 2004/10/27 18:01:42 tomas Exp $
|
||||
$Id: manual.html,v 1.4 2004/10/29 16:15:59 tomas Exp $
|
||||
</small>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user