本文整理了Java中com.intellij.openapi.util.io.FileUtil.delete()
方法的一些代码示例,展示了FileUtil.delete()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtil.delete()
方法的具体详情如下:
包路径:com.intellij.openapi.util.io.FileUtil
类名称:FileUtil
方法名:delete
暂无
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
@Override
protected void onFinish(@Nullable String message) {
IdeHelper.enablePluginAndConfigure(project);
if(message != null) {
// replace empty lines, provide html output, and remove our temporary path
showInfoNotification(project, message
.replaceAll("(?m)^\\s*$[\n\r]{1,}", "")
.replaceAll("(\r\n|\n)", "<br />")
.replace("/" + SymfonyInstallerUtil.PROJECT_SUB_FOLDER, "")
);
}
// remove temporary symfony installer folder
if(finalSymfonyInProject != null) {
FileUtil.delete(finalSymfonyInProject);
}
}
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
File fromDir = new File(baseDir.getPath() + "/" + SymfonyInstallerUtil.PROJECT_SUB_FOLDER);
FileUtil.copyDirContent(fromDir, new File(baseDir.getPath()));
FileUtil.delete(fromDir);
} catch (IOException e) {
SymfonyInstallerCommandExecutor.this.onError(e.getMessage());
代码示例来源:origin: AlexanderBartash/hybris-integration-intellij-idea-plugin
@Override
public void removeAllFiles(@NotNull final Collection<File> files) throws IOException {
Validate.notNull(files);
if (files.isEmpty()) {
return;
}
final LocalFileSystem localFileSystem = LocalFileSystem.getInstance();
for (File file : files) {
final VirtualFile virtualFile = localFileSystem.findFileByIoFile(file);
if (null != virtualFile) {
ApplicationManager.getApplication().runWriteAction(new RemoveFileComputable(virtualFile));
} else {
FileUtil.delete(file);
}
}
}
代码示例来源:origin: AlexanderBartash/hybris-integration-intellij-idea-plugin
private void findAntResult(final Map<Project, AntGenResult> resultMap) {
for (Project project : ProjectManager.getInstance().getOpenProjects()) {
final HybrisProjectSettings hybrisProjectSettings =
HybrisProjectSettingsComponent.getInstance(project).getState();
if (!hybrisProjectSettings.isHybrisProject()) {
continue;
}
final File file = new File(project.getBasePath() + "/" + hybrisProjectSettings.getHybrisDirectory() + "/temp/ant.ser");
if (file.exists()) {
AntGenResult result = null;
try (
final FileInputStream fileIn = new FileInputStream(file);
final ObjectInputStream in = new ObjectInputStream(fileIn)
) {
result = (AntGenResult) in.readObject();
} catch (IOException | ClassNotFoundException e) {
e.printStackTrace();
}
FileUtil.delete(file);
resultMap.put(project, result);
return;
}
}
}
内容来源于网络,如有侵权,请联系作者删除!