Mercurial Hosting > luan
diff src/luan/lib/OsLib.java @ 161:d310ebf4d6e7
add javaSearcher
git-svn-id: https://luan-java.googlecode.com/svn/trunk@162 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 19 Jun 2014 10:44:20 +0000 |
parents | 138b9baee80b |
children |
line wrap: on
line diff
--- a/src/luan/lib/OsLib.java Thu Jun 19 07:02:16 2014 +0000 +++ b/src/luan/lib/OsLib.java Thu Jun 19 10:44:20 2014 +0000 @@ -52,6 +52,10 @@ return list; } + public boolean exists() { + return Utils.exists(file); + } + LuanTable table() { LuanTable tbl = new IoLib.LuanFile(file).table(); try { @@ -59,7 +63,7 @@ File.class.getMethod( "getName" ), file ) ); tbl.put( "exists", new LuanJavaFunction( - File.class.getMethod( "exists" ), file + LuanFile.class.getMethod( "exists" ), this ) ); tbl.put( "is_directory", new LuanJavaFunction( File.class.getMethod( "isDirectory" ), file