本文整理了Java中com.intellij.openapi.util.io.FileUtil.createDirectory()
方法的一些代码示例,展示了FileUtil.createDirectory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtil.createDirectory()
方法的具体详情如下:
包路径:com.intellij.openapi.util.io.FileUtil
类名称:FileUtil
方法名:createDirectory
暂无
代码示例来源:origin: KronicDeth/intellij-elixir
/*** doBuildWithElixirc releated private methods */
@NotNull
private static File getBuildOutputDirectory(@NotNull JpsModule module,
boolean forTests,
@NotNull CompileContext context) throws ProjectBuildException {
JpsJavaExtensionService instance = JpsJavaExtensionService.getInstance();
File outputDirectory = instance.getOutputDirectory(module, forTests);
if (outputDirectory == null) {
String errorMessage = "No output directory for module " + module.getName();
context.processMessage(new CompilerMessage(ElIXIRC_NAME, BuildMessage.Kind.ERROR, errorMessage));
throw new ProjectBuildException(errorMessage);
}
if (!outputDirectory.exists()) {
FileUtil.createDirectory(outputDirectory);
}
return outputDirectory;
}
代码示例来源:origin: Camelcade/Perl5-IDEA
@NotNull
@Override
public String getLocalCacheRoot() {
String cachesPath = PerlPluginUtil.getRemotesCachePath();
File cacheRoot = new File(cachesPath, "wsl_" + getDistributionId());
FileUtil.createDirectory(cacheRoot);
return cacheRoot.getAbsolutePath();
}
代码示例来源:origin: Camelcade/Perl5-IDEA
@Nullable
@Override
public String getLocalCacheRoot() {
String cachesPath = PerlPluginUtil.getRemotesCachePath();
File cacheRoot = new File(cachesPath, "docker_" + getSafeImageName());
FileUtil.createDirectory(cacheRoot);
return cacheRoot.getAbsolutePath();
}
代码示例来源:origin: Camelcade/Perl5-IDEA
/**
* @return root for remote filesystems cache
*/
@NotNull
public static String getRemotesCachePath() {
String remotesCachePath = FileUtil.join(getPerlSystemPath(), REMOTES_DIR);
FileUtil.createDirectory(new File(remotesCachePath));
return remotesCachePath;
}
}
代码示例来源:origin: Camelcade/Perl5-IDEA
/**
* @return perl5 dir in the ide's {@code system} dir
*/
@NotNull
public static String getPerlSystemPath() {
String systemPath = PathManager.getSystemPath();
String perlDirectory = FileUtil.join(systemPath, PERL_DIR);
FileUtil.createDirectory(new File(perlDirectory));
return perlDirectory;
}
代码示例来源:origin: Camelcade/Perl5-IDEA
public void copyRemote(@NotNull String containerName, @NotNull String remotePath, @NotNull String localPath) throws ExecutionException {
try {
File localPathFile = new File(localPath);
FileUtil.createDirectory(localPathFile);
runCommand(COPY, AS_ARCHIVE, FOLLOWING_LINKS, containerName + ':' + remotePath, localPathFile.getParent());
}
catch (PerlExecutionException e) {
ProcessOutput processOutput = e.getProcessOutput();
String stderr = processOutput.getStderr();
if (!stderr.contains("no such file or directory") &&
!stderr.contains("Could not find the file") &&
!stderr.contains("No such container:path")) {
throw e;
}
}
}
代码示例来源:origin: liias/monkey
@NotNull
private static File getBuildOutputDirectory(@NotNull JpsModule module,
boolean forTests,
@NotNull CompileContext context) throws ProjectBuildException {
JpsJavaExtensionService instance = JpsJavaExtensionService.getInstance();
File outputDirectory = instance.getOutputDirectory(module, forTests);
if (outputDirectory == null) {
String errorMessage = "No output dir for module " + module.getName();
context.processMessage(new CompilerMessage(NAME, BuildMessage.Kind.ERROR, errorMessage));
throw new ProjectBuildException(errorMessage);
}
if (!outputDirectory.exists()) {
FileUtil.createDirectory(outputDirectory);
}
return outputDirectory;
}
内容来源于网络,如有侵权,请联系作者删除!