List of utility methods to do File Object Create
File | toFile(String inFile) to File return toFile(inFile, true, true);
|
String | toFile(String line) to File ByteArrayOutputStream bos = new ByteArrayOutputStream(); StringBuilder sb = new StringBuilder(); for (char c : line.toLowerCase().toCharArray()) { String s = String.valueOf(c); if (" ".equals(s)) { sb.append("/"); sleep(bos, 7 * 8); } else if (morseAlphabet.containsKey(s)) { ... |
File | toFile(String path) Convert Git path to a relative File return new File(path.replace('/', File.separatorChar)); |
File | toFile(String path) to File if (File.separatorChar == '/') { return new File(path.replace('\\', '/')); } else { return new File(path.replace('/', '\\')); |
File | toFile(String path) Like new File(path) EXCEPT this will convert Windows/Max/Linux separators into the local format. if (path == null) return null; if (File.separatorChar == '\\') { return new File(path.replace('/', File.separatorChar)); } else { return new File(path.replace('\\', File.separatorChar)); |
File | toFile(String path) to File String baseDir = System.getProperty(PARAM_CLASSPATH_BASE); if (baseDir != null) { return new File(baseDir, path); return new File(path); |
File | toFile(String path) create a file from path return new File(path.replace(FILE_ANTI_SEPERATOR, FILE_SEPERATOR)); |
void | toFile(String path, String toWrite) to File try { File file = new File(path); if (!file.exists()) { file.createNewFile(); FileWriter fw = new FileWriter(file.getAbsoluteFile(), true); BufferedWriter bw = new BufferedWriter(fw); bw.write(toWrite); ... |
File | toFile(String s) to File if (s == null) { return null; } else { return new File(s.replace('\\', File.separatorChar).replace('/', File.separatorChar)); |