本文整理了Java中com.sun.enterprise.util.io.FileUtils.isFriendlyFilename()
方法的一些代码示例,展示了FileUtils.isFriendlyFilename()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.isFriendlyFilename()
方法的具体详情如下:
包路径:com.sun.enterprise.util.io.FileUtils
类名称:FileUtils
方法名:isFriendlyFilename
暂无
代码示例来源:origin: org.glassfish.main.common/common-util
public static String makeFriendlyFilename(String filename) {
if (isFriendlyFilename(filename))
return filename;
String ret = makeLegalFilename(filename).replace(BLANK, REPLACEMENT_CHAR);
ret = ret.replace(DOT, REPLACEMENT_CHAR);
return ret;
}
代码示例来源:origin: org.glassfish.common/common-util
public static String makeFriendlyFilename(String filename) {
if (isFriendlyFilename(filename))
return filename;
String ret = makeLegalFilename(filename).replace(BLANK, REPLACEMENT_CHAR);
ret = ret.replace(DOT, REPLACEMENT_CHAR);
return ret;
}
代码示例来源:origin: eclipse-ee4j/glassfish
public static String makeFriendlyFilename(String filename) {
if (isFriendlyFilename(filename))
return filename;
String ret = makeLegalFilename(filename).replace(BLANK, REPLACEMENT_CHAR);
ret = ret.replace(DOT, REPLACEMENT_CHAR);
return ret;
}
代码示例来源:origin: org.glassfish.main.admin/server-mgmt
private void validateServiceName() throws CommandException {
if (!ok(serviceName))
serviceName = dirs.getServerDir().getName();
// On Windows we need a legal filename for the service name.
if(OS.isWindowsForSure() && !FileUtils.isFriendlyFilename(serviceName)) {
throw new CommandException(strings.get("create.service.badServiceName", serviceName));
}
if (logger.isLoggable(Level.FINER))
logger.finer("service name = " + serviceName);
}
代码示例来源:origin: org.glassfish.main.admin/server-mgmt
private void validateServiceName() throws CommandException {
if (!ok(serviceName))
serviceName = dirs.getServerDir().getName();
// On Windows we need a legal filename for the service name.
if(OS.isWindowsForSure() && !FileUtils.isFriendlyFilename(serviceName)) {
throw new CommandException(strings.get("create.service.badServiceName", serviceName));
}
logger.finer("service name = " + serviceName);
}
代码示例来源:origin: org.glassfish.admin/cli-optional
private void validateServiceName() throws CommandException {
if (!ok(serviceName))
serviceName = dirs.getServerDir().getName();
// On Windows we need a legal filename for the service name.
if(OS.isWindowsForSure() && !FileUtils.isFriendlyFilename(serviceName)) {
throw new CommandException(strings.get("create.service.badServiceName", serviceName));
}
logger.finer("service name = " + serviceName);
}
代码示例来源:origin: org.glassfish.admin/cli-optional
private void validateServiceName() throws CommandException {
if (!ok(serviceName))
serviceName = dirs.getServerDir().getName();
// On Windows we need a legal filename for the service name.
if(OS.isWindowsForSure() && !FileUtils.isFriendlyFilename(serviceName)) {
throw new CommandException(strings.get("create.service.badServiceName", serviceName));
}
logger.finer("service name = " + serviceName);
}
内容来源于网络,如有侵权,请联系作者删除!