本文整理了Java中java.nio.file.AccessDeniedException.getFile()
方法的一些代码示例,展示了AccessDeniedException.getFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AccessDeniedException.getFile()
方法的具体详情如下:
包路径:java.nio.file.AccessDeniedException
类名称:AccessDeniedException
方法名:getFile
暂无
代码示例来源:origin: torakiki/pdfsam
@EventListener
public void onTaskFailed(TaskExecutionFailedEvent e) {
if (e.getFailingCause() instanceof InvalidTaskParametersException) {
container.addNotification(DefaultI18nContext.getInstance().i18n("Invalid parameters"),
buildLabel(
DefaultI18nContext.getInstance()
.i18n("Input parameters are invalid, open the application messages for details."),
NotificationType.ERROR));
}
Throwable root = ExceptionUtils.getRootCause(e.getFailingCause());
if (root instanceof AccessDeniedException) {
container.addNotification(DefaultI18nContext.getInstance().i18n("Access denied"),
buildLabel(DefaultI18nContext.getInstance().i18n(
"Unable to access \"{0}\", please make sure you have write permissions or open the application messages for details.",
((AccessDeniedException) root).getFile()), NotificationType.ERROR));
}
}
代码示例来源:origin: org.graalvm.compiler/compiler
throw Files.isDirectory(result, NOFOLLOW_LINKS) ? new FileAlreadyExistsException(e.getFile()) : e;
内容来源于网络,如有侵权,请联系作者删除!