Mercurial Hosting > luan
comparison 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 |
comparison
equal
deleted
inserted
replaced
160:138b9baee80b | 161:d310ebf4d6e7 |
---|---|
50 list.add(new LuanFile(f).table()); | 50 list.add(new LuanFile(f).table()); |
51 } | 51 } |
52 return list; | 52 return list; |
53 } | 53 } |
54 | 54 |
55 public boolean exists() { | |
56 return Utils.exists(file); | |
57 } | |
58 | |
55 LuanTable table() { | 59 LuanTable table() { |
56 LuanTable tbl = new IoLib.LuanFile(file).table(); | 60 LuanTable tbl = new IoLib.LuanFile(file).table(); |
57 try { | 61 try { |
58 tbl.put( "name", new LuanJavaFunction( | 62 tbl.put( "name", new LuanJavaFunction( |
59 File.class.getMethod( "getName" ), file | 63 File.class.getMethod( "getName" ), file |
60 ) ); | 64 ) ); |
61 tbl.put( "exists", new LuanJavaFunction( | 65 tbl.put( "exists", new LuanJavaFunction( |
62 File.class.getMethod( "exists" ), file | 66 LuanFile.class.getMethod( "exists" ), this |
63 ) ); | 67 ) ); |
64 tbl.put( "is_directory", new LuanJavaFunction( | 68 tbl.put( "is_directory", new LuanJavaFunction( |
65 File.class.getMethod( "isDirectory" ), file | 69 File.class.getMethod( "isDirectory" ), file |
66 ) ); | 70 ) ); |
67 tbl.put( "is_file", new LuanJavaFunction( | 71 tbl.put( "is_file", new LuanJavaFunction( |