org.apache.commons.io.FilenameUtils.isSystemWindows()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(150)

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

FilenameUtils.isSystemWindows介绍

[英]Determines if Windows file system is in use.
[中]确定是否正在使用Windows文件系统。

代码示例

代码示例来源:origin: commons-io/commons-io

private void createCircularSymLink(final File file) throws IOException {
  if (!FilenameUtils.isSystemWindows()) {
    Runtime.getRuntime()
        .exec("ln -s " + file + "/.. " + file + "/cycle");
  } else {
    try {
      Runtime.getRuntime()
          .exec("mklink /D " + file + "/cycle" + file + "/.. ");
    } catch (final IOException ioe) { // So that tests run in FAT filesystems
      //don't fail
    }
  }
}

代码示例来源:origin: commons-io/commons-io

/**
 * Converts all separators to the system separator.
 *
 * @param path  the path to be changed, null ignored
 * @return the updated path
 */
public static String separatorsToSystem(final String path) {
  if (path == null) {
    return null;
  }
  if (isSystemWindows()) {
    return separatorsToWindows(path);
  } else {
    return separatorsToUnix(path);
  }
}

代码示例来源:origin: org.apache.commons/commons-io

/**
 * Converts all separators to the system separator.
 * 
 * @param path  the path to be changed, null ignored
 * @return the updated path
 */
public static String separatorsToSystem(String path) {
  if (path == null) {
    return null;
  }
  if (isSystemWindows()) {
    return separatorsToWindows(path);
  } else {
    return separatorsToUnix(path);
  }
}

代码示例来源:origin: Nextdoor/bender

throw new NullPointerException("File must not be null");
if (FilenameUtils.isSystemWindows()) {
  return false;

代码示例来源:origin: org.onosproject/onlab-thirdparty

throw new NullPointerException("File must not be null");
if (FilenameUtils.isSystemWindows()) {
  return false;

代码示例来源:origin: io.github.stephenc.docker/docker-client-shaded

/**
 * Converts all separators to the system separator.
 *
 * @param path  the path to be changed, null ignored
 * @return the updated path
 */
public static String separatorsToSystem(final String path) {
  if (path == null) {
    return null;
  }
  if (isSystemWindows()) {
    return separatorsToWindows(path);
  } else {
    return separatorsToUnix(path);
  }
}

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.io

/**
 * Converts all separators to the system separator.
 * 
 * @param path  the path to be changed, null ignored
 * @return the updated path
 */
public static String separatorsToSystem(String path) {
  if (path == null) {
    return null;
  }
  if (isSystemWindows()) {
    return separatorsToWindows(path);
  } else {
    return separatorsToUnix(path);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-io

/**
 * Converts all separators to the system separator.
 * 
 * @param path  the path to be changed, null ignored
 * @return the updated path
 */
public static String separatorsToSystem(String path) {
  if (path == null) {
    return null;
  }
  if (isSystemWindows()) {
    return separatorsToWindows(path);
  } else {
    return separatorsToUnix(path);
  }
}

代码示例来源:origin: Nextdoor/bender

/**
 * Converts all separators to the system separator.
 * 
 * @param path  the path to be changed, null ignored
 * @return the updated path
 */
public static String separatorsToSystem(String path) {
  if (path == null) {
    return null;
  }
  if (isSystemWindows()) {
    return separatorsToWindows(path);
  } else {
    return separatorsToUnix(path);
  }
}

代码示例来源:origin: org.onosproject/onlab-thirdparty

/**
 * Converts all separators to the system separator.
 * 
 * @param path  the path to be changed, null ignored
 * @return the updated path
 */
public static String separatorsToSystem(String path) {
  if (path == null) {
    return null;
  }
  if (isSystemWindows()) {
    return separatorsToWindows(path);
  } else {
    return separatorsToUnix(path);
  }
}

代码示例来源:origin: org.kie.commons/kie-nio2-model

/**
 * Converts all separators to the system separator.
 *
 * @param path  the path to be changed, null ignored
 * @return the updated path
 */
public static String separatorsToSystem(String path) {
  if (path == null) {
    return null;
  }
  if (isSystemWindows()) {
    return separatorsToWindows(path);
  } else {
    return separatorsToUnix(path);
  }
}

代码示例来源:origin: org.uberfire/vfs-model

/**
 * Converts all separators to the system separator.
 *
 * @param path  the path to be changed, null ignored
 * @return the updated path
 */
public static String separatorsToSystem(String path) {
  if (path == null) {
    return null;
  }
  if (isSystemWindows()) {
    return separatorsToWindows(path);
  } else {
    return separatorsToUnix(path);
  }
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Converts all separators to the system separator.
 *
 * @param path  the path to be changed, null ignored
 * @return the updated path
 */
public static String separatorsToSystem(final String path) {
  if (path == null) {
    return null;
  }
  if (isSystemWindows()) {
    return separatorsToWindows(path);
  } else {
    return separatorsToUnix(path);
  }
}

代码示例来源:origin: io.github.stephenc.docker/docker-client-shaded

throw new NullPointerException("File must not be null");
if (FilenameUtils.isSystemWindows()) {
  return false;

相关文章