本文整理了Java中ch.qos.logback.core.util.FileUtil
类的一些代码示例,展示了FileUtil
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtil
类的具体详情如下:
包路径:ch.qos.logback.core.util.FileUtil
类名称:FileUtil
暂无
代码示例来源:origin: camunda/camunda-bpm-platform
void createMissingTargetDirsIfNecessary(File toFile) throws RolloverFailure {
if (FileUtil.isParentDirectoryCreationRequired(toFile)) {
boolean result = FileUtil.createMissingParentDirectories(toFile);
if (!result) {
throw new RolloverFailure("Failed to create parent directories for ["
+ toFile.getAbsolutePath() + "]");
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void renameByCopying(String src, String target)
throws RolloverFailure {
FileUtil fileUtil = new FileUtil(getContext());
fileUtil.copy(src, target);
File srcFile = new File(src);
if (!srcFile.delete()) {
addWarn("Could not delete " + src);
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
public String resourceAsString(ClassLoader classLoader, String resourceName) {
URL url = classLoader.getResource(resourceName);
if (url == null) {
addError("Failed to find resource [" + resourceName + "]");
return null;
addError("Failed to open " + resourceName, e);
} finally {
if (isr != null) {
代码示例来源:origin: ch.qos.logback/logback-classic
currentPackageName = currentPackageName.replace('.', '/');
FileUtil fileUtil = new FileUtil(getContext());
String scriptText = fileUtil.resourceAsString(classLoader, currentPackageName + "/EvaluatorTemplate.groovy");
if (scriptText == null) {
return;
代码示例来源:origin: tony19/logback-android
void createMissingTargetDirsIfNecessary(File toFile) throws RolloverFailure {
boolean result = FileUtil.createMissingParentDirectories(toFile);
if (!result) {
throw new RolloverFailure("Failed to create parent directories for ["
+ toFile.getAbsolutePath() + "]");
}
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
if (FileUtil.mustCreateParentDirectories(file)) {
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for ["
代码示例来源:origin: camunda/camunda-bpm-platform
public FileUtil(Context context) {
setContext(context);
}
代码示例来源:origin: tony19/logback-android
@Test
public void basicCopyingWorks() throws IOException {
String dir = CoreTestConstants.OUTPUT_DIR_PREFIX+"/fu"+diff;
File dirFile = new File(dir);
dirFile.mkdir();
String src = CoreTestConstants.TEST_INPUT_PREFIX + "compress1.copy";
String target = CoreTestConstants.OUTPUT_DIR_PREFIX+"/fu"+diff+"/copyingWorks.txt";
fileUtil.copy(src, target);
Compare.compare(src, target);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.classic
currentPackageName = currentPackageName.replace('.', '/');
String scriptText = FileUtil.resourceAsString(this, classLoader, currentPackageName + "/EvaluatorTemplate.groovy");
if (scriptText == null) {
return;
代码示例来源:origin: tony19/logback-android
void createMissingTargetDirsIfNecessary(File file) {
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for ["
+ file.getAbsolutePath() + "]");
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
currentPackageName = currentPackageName.replace('.', '/');
FileUtil fileUtil = new FileUtil(getContext());
String scriptText = fileUtil.resourceAsString(classLoader, currentPackageName + "/EvaluatorTemplate.groovy");
if (scriptText == null) {
return;
代码示例来源:origin: tony19/logback-android
public FileUtil(Context context) {
setContext(context);
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
void createMissingTargetDirsIfNecessary(File file) {
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for [" + file.getAbsolutePath() + "]");
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
void createMissingTargetDirsIfNecessary(File file) {
if (FileUtil.isParentDirectoryCreationRequired(file)) {
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for ["
+ file.getAbsolutePath() + "]");
} else {
addInfo("Created missing parent directories for ["
+ file.getAbsolutePath() + "]");
}
}
}
代码示例来源:origin: tony19/logback-android
public void renameByCopying(String src, String target)
throws RolloverFailure {
FileUtil fileUtil = new FileUtil(getContext());
fileUtil.copy(src, target);
File srcFile = new File(src);
if (!srcFile.delete()) {
addWarn("Could not delete " + src);
}
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
currentPackageName = currentPackageName.replace('.', '/');
FileUtil fileUtil = new FileUtil(getContext());
String scriptText = fileUtil.resourceAsString(classLoader, currentPackageName + "/EvaluatorTemplate.groovy");
if (scriptText == null) {
return;
代码示例来源:origin: camunda/camunda-bpm-platform
} catch (IOException ioe) {
String msg = "Failed to copy [" + src + "] to [" + destination + "]";
addError(msg, ioe);
throw new RolloverFailure(msg);
} finally {
代码示例来源:origin: io.virtdata/virtdata-lib-realer
public FileUtil(Context context) {
setContext(context);
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
void createMissingTargetDirsIfNecessary(File toFile) throws RolloverFailure {
boolean result = FileUtil.createMissingParentDirectories(toFile);
if (!result) {
throw new RolloverFailure("Failed to create parent directories for [" + toFile.getAbsolutePath() + "]");
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
try {
File file = new File(file_name);
if (FileUtil.isParentDirectoryCreationRequired(file)) {
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for ["
内容来源于网络,如有侵权,请联系作者删除!