summaryrefslogtreecommitdiff
path: root/teste.lua
diff options
context:
space:
mode:
authortomas <tomas>2004-10-29 16:15:59 +0000
committertomas <tomas>2004-10-29 16:15:59 +0000
commitf66af01eece2627f8dbeb37426f4040107ca073a (patch)
treeb069287231bf3e116ff05315378266d8266499f1 /teste.lua
parent40db9dba61acbbdf8474c900c522fa6d0b556763 (diff)
downloadluafilesystem-f66af01eece2627f8dbeb37426f4040107ca073a.tar.gz
luafilesystem-f66af01eece2627f8dbeb37426f4040107ca073a.tar.bz2
luafilesystem-f66af01eece2627f8dbeb37426f4040107ca073a.zip
Acrescimo de exemplo.
Acrescimo do logo.
Diffstat (limited to '')
-rw-r--r--teste.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/teste.lua b/teste.lua
index ec6da44..556cab0 100644
--- a/teste.lua
+++ b/teste.lua
@@ -1,24 +1,24 @@
1#!/usr/local/bin/lua -i 1#!/usr/local/bin/lua -i
2 2
3require"luafilesystem" 3require"lfs"
4 4
5print(luafilesystem.version) 5print(lfs.version)
6 6
7function p () 7function p ()
8 local fh = assert (io.open ("teste", 'r')) 8 local fh = assert (io.open ("teste", 'r'))
9 assert (luafilesystem.lock (fh, 'r')) 9 assert (lfs.lock (fh, 'r'))
10 print (fh:read"*a") 10 print (fh:read"*a")
11 fh:close () 11 fh:close ()
12end 12end
13 13
14function wr () 14function wr ()
15 fh = assert (io.open ("teste", 'w')) 15 fh = assert (io.open ("teste", 'w'))
16 assert (luafilesystem.lock (fh, 'w')) 16 assert (lfs.lock (fh, 'w'))
17end 17end
18 18
19function op () 19function op ()
20 fh = assert (io.open ("teste", 'r')) 20 fh = assert (io.open ("teste", 'r'))
21 assert (luafilesystem.lock (fh, 'r')) 21 assert (lfs.lock (fh, 'r'))
22end 22end
23 23
24function fw (x) 24function fw (x)