1 package cx.fbn.nevernote.utilities;
9 public final class FileUtils {
11 private FileUtils() {}
13 public static String toFileURLString(File file) {
14 // NFC TODO: is it safe to use file.toURI().toURL() instead?
15 String prefix = (System.getProperty("os.name").contains("Windows") ? "file:///" : "file://");
16 return prefix + toForwardSlashedPath(file.getAbsolutePath());
19 public static String toForwardSlashedPath(String path) {
20 return path.replace('\\', '/');