X-Git-Url: http://git.megacz.com/?p=org.ibex.js.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FDirectory.java;h=9bcc7f6e858497dc869650c6ebf3abd92abc2c58;hp=0c0fc73c2c3d6df13ff76609a8db231ea94eb649;hb=a1e6b7e9307319c0195b0efbe5e5354c128be481;hpb=f637057f12669bb9fe8d76a72e0bfcc898dc0715 diff --git a/src/org/ibex/js/Directory.java b/src/org/ibex/js/Directory.java index 0c0fc73..9bcc7f6 100644 --- a/src/org/ibex/js/Directory.java +++ b/src/org/ibex/js/Directory.java @@ -65,14 +65,14 @@ public class Directory extends JS.Immutable { public void put(JS key0, JS val) throws JSExn { try { if (key0 == null) return; - String key = Script.toString(key0); + String key = JSU.toString(key0); File f2 = new File(f.getAbsolutePath() + File.separatorChar + Encode.toFilename(key)); destroy(f2); if (val == null) return; if (val instanceof JSPrimitive) { OutputStream out = new FileOutputStream(f2); Writer w = new OutputStreamWriter(out); - w.write(Script.toString(val)); + w.write(JSU.toString(val)); w.flush(); out.close(); } else { @@ -92,7 +92,7 @@ public class Directory extends JS.Immutable { public JS get(JS key0) throws JSExn { try { if (key0 == null) return null; - String key = Script.toString(key0); + String key = JSU.toString(key0); File f2 = new File(f.getAbsolutePath() + File.separatorChar + Encode.toFilename(key)); if (!f2.exists()) return null; if (f2.isDirectory()) return new Directory(f2); @@ -101,7 +101,7 @@ public class Directory extends JS.Immutable { Reader r = new InputStreamReader(new FileInputStream(f2)); while(true) { int numread = r.read(chars, numchars, chars.length - numchars); - if (numread == -1) return Script.S(new String(chars, 0, numchars)); + if (numread == -1) return JSU.S(new String(chars, 0, numchars)); numchars += numread; } } catch (IOException ioe) { @@ -114,7 +114,7 @@ public class Directory extends JS.Immutable { return new JS.Enumeration(null) { int i = 0; public boolean _hasNext() { return i < elements.length; } - public JS _next() { return Script.S(Encode.fromFilename(elements[i++])); } + public JS _next() { return JSU.S(Encode.fromFilename(elements[i++])); } }; } }