org.uberfire.java.nio.file.FileSystems.getDefault()方法的使用及代码示例

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

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

FileSystems.getDefault介绍

暂无

代码示例

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

/**
 * @throws IllegalArgumentException
 * @see <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/file/Paths.html#get(java.lang.String, java.lang.String...)">JDK JavaDoc</a>
 */
public static Path get(final String first, final String... more)
    throws IllegalArgumentException {
  checkNotNull("first", first);
  if (first.trim().length() == 0) {
    return FileSystems.getDefault().getPath(first);
  }
  URI uri = null;
  if (more == null || more.length == 0) {
    try {
      uri = new URI(first);
    } catch (URISyntaxException ex) {
      try {
        uri = URI.create(first);
      } catch (IllegalArgumentException e) {
        uri = null;
      }
    }
  }
  if (uri != null && uri.getScheme() != null) {
    return get(uri);
  }
  return FileSystems.getDefault().getPath(first, more);
}

代码示例来源:origin: org.uberfire/uberfire-nio2-api

/**
 * @throws IllegalArgumentException
 * @see <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/file/Paths.html#get(java.lang.String, java.lang.String...)">JDK JavaDoc</a>
 */
public static Path get(final String first,
            final String... more)
    throws IllegalArgumentException {
  checkNotNull("first",
         first);
  if (first.trim().length() == 0) {
    return FileSystems.getDefault().getPath(first);
  }
  URI uri = null;
  if (more == null || more.length == 0) {
    try {
      uri = new URI(first);
    } catch (URISyntaxException ex) {
      try {
        uri = URI.create(first);
      } catch (IllegalArgumentException e) {
        uri = null;
      }
    }
  }
  if (uri != null && uri.getScheme() != null) {
    return get(uri);
  }
  return FileSystems.getDefault().getPath(first,
                      more);
}

代码示例来源:origin: kiegroup/appformer

/**
 * @throws IllegalArgumentException
 * @see <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/file/Paths.html#get(java.lang.String, java.lang.String...)">JDK JavaDoc</a>
 */
public static Path get(final String first,
            final String... more)
    throws IllegalArgumentException {
  checkNotNull("first",
         first);
  if (first.trim().length() == 0) {
    return FileSystems.getDefault().getPath(first);
  }
  URI uri = null;
  if (more == null || more.length == 0) {
    try {
      uri = new URI(first);
    } catch (URISyntaxException ex) {
      try {
        uri = URI.create(first);
      } catch (IllegalArgumentException e) {
        uri = null;
      }
    }
  }
  if (uri != null && uri.getScheme() != null) {
    return get(uri);
  }
  return FileSystems.getDefault().getPath(first,
                      more);
}

代码示例来源:origin: kiegroup/appformer

@Test
public void testGetDefault() {
  assertThat(FileSystems.getDefault())
      .isInstanceOf(BaseSimpleFileSystem.class);
}

相关文章