hudson.Util.createTempDir()方法的使用及代码示例

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

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

Util.createTempDir介绍

[英]Creates a new temporary directory.
[中]创建一个新的临时目录。

代码示例

代码示例来源:origin: jenkinsci/jenkins

File tmpDir = Util.createTempDir();

代码示例来源:origin: jenkinsci/jenkins

File dir = Util.createTempDir();
hudson.setMountPoint(dir);
hudson.mount();

代码示例来源:origin: org.jvnet.hudson.main/hudson-test-harness

private TestPluginManager() throws IOException {
  // TestPluginManager outlives a Jetty server, so can't pass in ServletContext.
  super(null, Util.createTempDir());
}

代码示例来源:origin: org.eclipse.hudson/hudson-test-framework

private TestPluginManager() throws IOException {
  // TestPluginManager outlives a Jetty server, so can't pass in ServletContext.
  super(null, Util.createTempDir());
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-test-framework

private TestPluginManager() throws IOException {
  // TestPluginManager outlives a Jetty server, so can't pass in ServletContext.
  super(null, Util.createTempDir());
}

代码示例来源:origin: jenkinsci/jenkins-test-harness

public TestPluginManager() throws IOException {
  // TestPluginManager outlives a Jetty server, so can't pass in ServletContext.
  super(null, Util.createTempDir());
}

代码示例来源:origin: jenkinsci/git-client-plugin

/**
 * Creates a empty dummy {@link Repository} to keep JGit happy where it wants a valid {@link Repository} operation
 * for remote objects.
 */
private Repository openDummyRepository() throws IOException {
  final File tempDir = Util.createTempDir();
  return new FileRepository(tempDir) {
    @Override
    public void close() {
      super.close();
      try {
        Util.deleteRecursive(tempDir);
      } catch (IOException e) {
        // ignore
      }
    }
  };
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

File tmpDir = Util.createTempDir();

代码示例来源:origin: jenkinsci/docker-slaves-plugin

@Override
public String getImage(DockerDriver driver, FilePath workspace, TaskListener listener) throws IOException, InterruptedException {
  if (image != null) return image;
  String tag = Long.toHexString(System.nanoTime());
  final FilePath pathToContext = workspace.child(contextPath);
  if (!pathToContext.exists()) {
    throw new IOException(pathToContext.getRemote() + " does not exists.");
  }
  final FilePath pathToDockerfile = pathToContext.child(dockerfile);
  if (!pathToDockerfile.exists()) {
    throw new IOException( pathToContext.getRemote() + " does not exists.");
  }
  final File context = Util.createTempDir();
  pathToContext.copyRecursiveTo(new FilePath(context));
  pathToDockerfile.copyTo(new FilePath(new File(context, "Dockerfile")));
  driver.buildDockerfile(listener, context.getAbsolutePath(), tag, forcePull);
  Util.deleteRecursive(context);
  this.image = tag;
  return tag;
}

代码示例来源:origin: io.jenkins.plugins/docker-slaves

@Override
public String getImage(DockerDriver driver, FilePath workspace, TaskListener listener) throws IOException, InterruptedException {
  boolean pull = forcePull;
  if (image != null) return image;
  String tag = Long.toHexString(System.nanoTime());
  final FilePath pathToContext = workspace.child(contextPath);
  if (!pathToContext.exists()) {
    throw new IOException(pathToContext.getRemote() + " does not exists.");
  }
  final FilePath pathToDockerfile = pathToContext.child(dockerfile);
  if (!pathToDockerfile.exists()) {
    throw new IOException( pathToContext.getRemote() + " does not exists.");
  }
  final File context = Util.createTempDir();
  pathToContext.copyRecursiveTo(new FilePath(context));
  pathToDockerfile.copyTo(new FilePath(new File(context, "Dockerfile")));
  driver.buildDockerfile(listener, context.getAbsolutePath(), tag, pull);
  Util.deleteRecursive(context);
  this.image = tag;
  return tag;
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

File tmpDir = Util.createTempDir();

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

File tmpDir = Util.createTempDir();

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

File dir = Util.createTempDir();
hudson.setMountPoint(dir);
hudson.mount();

代码示例来源:origin: org.eclipse.hudson/hudson-core

File dir = Util.createTempDir();
hudson.setMountPoint(dir);
hudson.mount();

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

File dir = Util.createTempDir();
hudson.setMountPoint(dir);
hudson.mount();

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

File dir = Util.createTempDir();
hudson.setMountPoint(dir);
hudson.mount();

代码示例来源:origin: hudson/hudson-2.x

File dir = Util.createTempDir();
hudson.setMountPoint(dir);
hudson.mount();

代码示例来源:origin: org.hudsonci.plugins/cvs

File destdir = null;
try {
  destdir = Util.createTempDir();

代码示例来源:origin: org.jvnet.hudson.plugins/cvs

File destdir = null;
try {
  destdir = Util.createTempDir();

代码示例来源:origin: achikin/testrail-jenkins-plugin

FilePath tempdir = new FilePath(Util.createTempDir());

相关文章

微信公众号

最新文章

更多