public File createFile(string name) { if (!isDir()) { throw IOErr.make("Not a directory: " + this).val; } return(this.plus(FanStr.toUri(name)).create()); }
public File createDir(string name) { if (!isDir()) { throw IOErr.make("Not a directory: " + this).val; } if (!name.EndsWith("/")) { name = name + "/"; } return(this.plus(FanStr.toUri(name)).create()); }
public string toLocale(string pattern) { if (pattern == null) { return(localeAbbr()); } if (FanStr.isEveryChar(pattern, 'W')) { switch (pattern.Length) { case 3: return(localeAbbr()); case 4: return(localeFull()); } } throw ArgErr.make("Invalid pattern: " + pattern).val; }
static void pods(String progName) { version(progName); long t1 = Duration.nowTicks(); List pods = Pod.list(); long t2 = Duration.nowTicks(); writeLine(""); writeLine("Fantom Pods [" + (t2 - t1) / 1000000L + "ms]:"); writeLine(" Pod Version"); writeLine(" --- -------"); for (int i = 0; i < pods.sz(); ++i) { Pod pod = (Pod)pods.get(i); writeLine(" " + FanStr.justl(pod.name(), 18L) + " " + FanStr.justl(pod.version().toStr(), 8)); } }
////////////////////////////////////////////////////////////////////////// // Static ////////////////////////////////////////////////////////////////////////// public static object decode(string s) { return(new ObjDecoder(FanStr.@in(s), null).readObj()); }
public override long hash() { return(FanStr.hash(signature())); }