101 lines
2.8 KiB
Java
101 lines
2.8 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* javax.baja.nre.util.SortUtil
|
|
*/
|
|
package javax.baja.file.zip;
|
|
|
|
import java.util.HashMap;
|
|
import javax.baja.file.BAbstractFileStore;
|
|
import javax.baja.file.BDirectory;
|
|
import javax.baja.file.BIFile;
|
|
import javax.baja.file.FilePath;
|
|
import javax.baja.file.zip.BZipSpace;
|
|
import javax.baja.nre.util.SortUtil;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public class BZipFileDirectory
|
|
extends BAbstractFileStore {
|
|
public static final Type TYPE;
|
|
private HashMap byName;
|
|
private BIFile[] byList;
|
|
static /* synthetic */ Class class$javax$baja$file$zip$BZipFileDirectory;
|
|
|
|
BDirectory getOrMakeDir(String string) {
|
|
BDirectory bDirectory = (BDirectory)this.byName.get(string);
|
|
if (bDirectory == null) {
|
|
BZipSpace bZipSpace = (BZipSpace)this.getFileSpace();
|
|
FilePath filePath = this.getFilePath().merge(string);
|
|
BZipFileDirectory bZipFileDirectory = new BZipFileDirectory(bZipSpace, filePath);
|
|
bDirectory = new BDirectory(bZipFileDirectory);
|
|
this.byName.put(string, bDirectory);
|
|
}
|
|
return bDirectory;
|
|
}
|
|
|
|
BIFile get(String string) {
|
|
return (BIFile)this.byName.get(string);
|
|
}
|
|
|
|
BIFile[] list() {
|
|
if (this.byList == null) {
|
|
this.byList = this.byName.values().toArray(new BIFile[this.byName.size()]);
|
|
SortUtil.sort((Object[])this.byList);
|
|
}
|
|
return this.byList;
|
|
}
|
|
|
|
void add(BIFile bIFile) {
|
|
this.byName.put(bIFile.getFileName(), bIFile);
|
|
}
|
|
|
|
public boolean isDirectory() {
|
|
return true;
|
|
}
|
|
|
|
public boolean isReadonly() {
|
|
return true;
|
|
}
|
|
|
|
public Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
static /* synthetic */ Class class(String string, boolean bl) {
|
|
try {
|
|
Class<?> clazz = Class.forName(string);
|
|
if (!bl) {
|
|
clazz = clazz.getComponentType();
|
|
}
|
|
return clazz;
|
|
}
|
|
catch (ClassNotFoundException classNotFoundException) {
|
|
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
|
}
|
|
}
|
|
|
|
private final /* synthetic */ void this() {
|
|
this.byName = new HashMap();
|
|
this.byList = null;
|
|
}
|
|
|
|
public BZipFileDirectory(BZipSpace bZipSpace, FilePath filePath) {
|
|
super(bZipSpace, filePath);
|
|
this.this();
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$javax$baja$file$zip$BZipFileDirectory;
|
|
if (clazz == null) {
|
|
clazz = class$javax$baja$file$zip$BZipFileDirectory = BZipFileDirectory.class("[Ljavax.baja.file.zip.BZipFileDirectory;", false);
|
|
}
|
|
TYPE = Sys.loadType(clazz);
|
|
}
|
|
}
|
|
|