热汗舞蹈 v1.24.1.0版本的 MD5 值为:f1dc6ef07903515a73f51f41f372123e
以下内容为反编译后的 r.java 源代码,内容仅作参考
package i0;
import ch.qos.logback.core.rolling.RolloverFailure;
import java.io.File;
public class r extends k0.e {
public static String f30886a = "http://logback.qos.ch/codes.html#renamingError";
public Boolean F(File file, File file2) throws RolloverFailure {
if (m0.i.c()) {
File parentFile = file2.getAbsoluteFile().getParentFile();
if (parentFile == null) {
addWarn("Parent of target file [" + file2 + "] is null");
return null;
} else if (parentFile.exists()) {
try {
return Boolean.valueOf(!k.a(file, parentFile));
} catch (RolloverFailure e10) {
addWarn("Error while checking file store equality", e10);
return null;
}
} else {
addWarn("Parent of target file [" + file2 + "] does not exist");
return null;
}
}
return Boolean.FALSE;
}
public void G(String str, String str2) throws RolloverFailure {
if (str.equals(str2)) {
addWarn("Source and target files are the same [" + str + "]. Skipping.");
return;
}
File file = new File(str);
if (!file.exists()) {
throw new RolloverFailure("File [" + str + "] does not exist.");
}
File file2 = new File(str2);
createMissingTargetDirsIfNecessary(file2);
addInfo("Renaming file [" + file + "] to [" + file2 + "]");
if (file.renameTo(file2)) {
return;
}
addWarn("Failed to rename file [" + file + "] as [" + file2 + "].");
if (Boolean.TRUE.equals(F(file, file2))) {
addWarn("Detected different file systems for source [" + str + "] and target [" + str2 + "]. Attempting rename by copying.");
H(str, str2);
return;
}
addWarn("Please consider leaving the [file] option of " + h0.b.class.getSimpleName() + " empty.");
StringBuilder sb2 = new StringBuilder();
sb2.append("See also ");
sb2.append(f30886a);
addWarn(sb2.toString());
}
public void H(String str, String str2) throws RolloverFailure {
new m0.l(getContext()).F(str, str2);
if (new File(str).delete()) {
return;
}
addWarn("Could not delete " + str);
}
public void createMissingTargetDirsIfNecessary(File file) throws RolloverFailure {
if (m0.l.G(file)) {
return;
}
throw new RolloverFailure("Failed to create parent directories for [" + file.getAbsolutePath() + "]");
}
public String toString() {
return "c.q.l.co.rolling.helper.RenameUtil";
}
}