com.sun.enterprise.util.io.FileUtils.isFriendlyFilename()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(135)

本文整理了Java中com.sun.enterprise.util.io.FileUtils.isFriendlyFilename()方法的一些代码示例,展示了FileUtils.isFriendlyFilename()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.isFriendlyFilename()方法的具体详情如下:
包路径:com.sun.enterprise.util.io.FileUtils
类名称:FileUtils
方法名:isFriendlyFilename

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);
}

相关文章