本文整理了Java中org.openide.filesystems.FileUtil.canBeCanonicalizedOnWindows()
方法的一些代码示例,展示了FileUtil.canBeCanonicalizedOnWindows()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtil.canBeCanonicalizedOnWindows()
方法的具体详情如下:
包路径:org.openide.filesystems.FileUtil
类名称:FileUtil
方法名:canBeCanonicalizedOnWindows
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
static URL fileToURL(File file) throws MalformedURLException {
URL retVal = null;
if (canBeCanonicalizedOnWindows(file)) {
retVal = file.toURI().toURL();
} else {
retVal = new URL ("file:/"+file.getAbsolutePath ());//NOI18N
}
return retVal;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
static URL fileToURL(File file) throws MalformedURLException {
URL retVal = null;
if (canBeCanonicalizedOnWindows(file)) {
retVal = file.toURI().toURL();
} else {
retVal = new URL ("file:/"+file.getAbsolutePath ());//NOI18N
}
return retVal;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
private static File normalizeFileOnWindows(final File file) {
File retVal = null;
if (canBeCanonicalizedOnWindows(file)) {
try {
retVal = file.getCanonicalFile();
} catch (IOException e) {
ErrorManager.getDefault().log(ErrorManager.ERROR, "getCanonicalFile() on file " + file + " failed. " + e.toString()); // NOI18N
}
}
return (retVal != null) ? retVal : file.getAbsoluteFile();
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
private static File normalizeFileOnWindows(final File file) {
File retVal = null;
if (canBeCanonicalizedOnWindows(file)) {
try {
retVal = file.getCanonicalFile();
} catch (IOException e) {
ErrorManager.getDefault().log(ErrorManager.ERROR, "getCanonicalFile() on file " + file + " failed. " + e.toString()); // NOI18N
}
}
return (retVal != null) ? retVal : file.getAbsoluteFile();
}
内容来源于网络,如有侵权,请联系作者删除!