Пример #1
0
 public OpenLZMAEntry(OpenPath parent, SevenZipEntry entry) {
   mParent = parent;
   ze = entry;
   if (ze.getName().endsWith("/") || ze.isDirectory()) {
     try {
       mChildren = list();
     } catch (IOException e) {
     }
   }
 }
Пример #2
0
 public List<OpenLZMAEntry> getAllEntries() throws IOException {
   if (mEntries != null) return mEntries;
   mEntries = new ArrayList<OpenLZMAEntry>();
   for (int i = 0; i < mLZMA.size(); i++) {
     SevenZipEntry ze = mLZMA.getEntry(i);
     if (ze.isDirectory()) continue;
     String parent = ze.getName();
     if (parent.indexOf("/") > 0 && parent.indexOf("/") < parent.length() - 1)
       parent = parent.substring(0, parent.lastIndexOf("/") + 1);
     else parent = "";
     OpenPath vp = findVirtualPath(parent);
     OpenLZMAEntry entry = new OpenLZMAEntry(vp, ze);
     mEntries.add(entry);
     addFamilyEntry(parent, entry);
   }
   Set<String> keys = mFamily.keySet();
   for (String path : keys.toArray(new String[keys.size()])) {
     if (path.equals("")) continue;
     addFamilyPath(path);
   }
   return mEntries;
 }
Пример #3
0
 @Override
 public Boolean isFile() {
   return !ze.isDirectory();
 }
Пример #4
0
 @Override
 public Boolean isDirectory() {
   return ze.isDirectory() || ze.getName().endsWith("/");
 }