slashify method

private static String slashify(String path, boolean isDirectory) {
 String p = path;
 if (File.separatorChar != '/')
     p = p.replace(File.separatorChar, '/');
 if (!p.startsWith("/"))
     p = "/" + p;
 if (!p.endsWith("/") && isDirectory)
     p = p + "/";
 return p;
}

パスが実在し、且つディレクトリな場合、末尾に '/' がつく。

てっきり、Linuxwindowsで挙動が違う?とばかり思ってたけどそういう事なのねw