org.geoserver.util.IOUtils.createRandomDirectory()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(133)

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

IOUtils.createRandomDirectory介绍

[英]Creates a directory as a child of baseDir. The directory name will be preceded by prefix and followed by suffix
[中]创建一个目录作为baseDir的子目录。目录名前加前缀,后加后缀

代码示例

代码示例来源:origin: geoserver/geoserver

public GeoServerTestApplicationContext(String[] configLocation, ServletContext servletContext)
    throws BeansException {
  super(configLocation, false);
  try {
    contextTmp = IOUtils.createRandomDirectory("./target", "mock", "tmp");
    servletContext.setAttribute("javax.servlet.context.tempdir", contextTmp);
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
  this.servletContext = servletContext;
}

代码示例来源:origin: geoserver/geoserver

public SystemTestData() throws IOException {
  // setup the root
  data = IOUtils.createRandomDirectory("./target", "default", "data");
  data.delete();
  data.mkdir();
}

代码示例来源:origin: geoserver/geoserver

@Override
public void setUp() throws Exception {
  data = IOUtils.createRandomDirectory("./target", "live", "data");
  IOUtils.deepCopy(source, data);
}

代码示例来源:origin: geoserver/geoserver

/**
 * Deeps copy the dataDirSourceDirectory provided in the constructor into a temporary directory.
 * Subclasses may override it in order to add extra behavior (like setting up an external
 * database)
 */
public void setUp() throws Exception {
  data = IOUtils.createRandomDirectory("./target", "live", "data");
  IOUtils.deepCopy(source, data);
}

代码示例来源:origin: geoserver/geoserver

public MockTestData() throws IOException {
  // setup the root
  data = IOUtils.createRandomDirectory("./target", "mock", "data");
  data.delete();
  data.mkdir();
  mockCreator = new MockCreator();
}

代码示例来源:origin: geoserver/geoserver

public MockData() throws IOException {
  data = IOUtils.createRandomDirectory("./target", "mock", "data");
  data.delete();
  data.mkdir();

代码示例来源:origin: org.geoserver.security/gs-sec-jdbc

@Override
public void setUp() throws Exception {
  data = IOUtils.createRandomDirectory("./target", "live", "data");
  IOUtils.deepCopy(source, data);
}

代码示例来源:origin: org.geoserver/gs-kml

org.geoserver.util.IOUtils.createRandomDirectory(
        "./target", "kmplacemark", "test");
tempDir.deleteOnExit();

相关文章