assets/src/org/ruboto/Script.java in ruboto-0.10.0 vs assets/src/org/ruboto/Script.java in ruboto-0.10.1
- old
+ new
@@ -126,10 +126,20 @@
return url.toString();
}
return null;
}
+ public File getFile() {
+ for (String dir : scriptsDir) {
+ File f = new File(dir, name);
+ if (f.exists()) {
+ return f;
+ }
+ }
+ return new File(scriptsDir[0], name);
+ }
+
public String getContents() throws IOException {
InputStream is = null;
BufferedReader buffer = null;
try {
buffer = new BufferedReader(new java.io.InputStreamReader(new URL(getAbsolutePath()).openStream()), 8192);
@@ -149,19 +159,9 @@
if (is != null) {
buffer.close();
}
}
}
-
- public File getFile() {
- for (String dir : scriptsDir) {
- File f = new File(dir, name);
- if (f.exists()) {
- return f;
- }
- }
- return new File(scriptsDir[0], name);
- }
public String getName() {
return name;
}