use of com.github.mjdev.libaums.fs.UsbFile in project AnExplorer by 1hakr.
the class UsbStorageProvider method querySearchDocuments.
@Override
public Cursor querySearchDocuments(String rootId, String query, String[] projection) throws FileNotFoundException {
UsbPartition usbPartition = mRoots.get(rootId);
final UsbFile parent = usbPartition.fileSystem.getRootDirectory();
updateSettings();
final MatrixCursor result = new MatrixCursor(resolveDocumentProjection(projection));
// TODO implement actual search
return result;
}
use of com.github.mjdev.libaums.fs.UsbFile in project samourai-wallet-android by Samourai-Wallet.
the class OpenDimeActivity method onBackPressed.
@Override
public void onBackPressed() {
try {
UsbFile dir = dirs.pop();
} catch (NoSuchElementException e) {
;
}
AppUtil.getInstance(OpenDimeActivity.this).restartApp();
super.onBackPressed();
}
use of com.github.mjdev.libaums.fs.UsbFile in project samourai-wallet-android by Samourai-Wallet.
the class UsbFileWrapper method listFiles.
@Override
public UsbFile[] listFiles() throws IOException {
if (dir == null) {
throw new UnsupportedOperationException("This is a file!");
}
List<UsbFile> list = new ArrayList<>();
Iterator<? extends FSEntry> iterator = dir.iterator();
while (iterator.hasNext()) {
FSEntry entry = iterator.next();
list.add(new UsbFileWrapper(entry));
}
UsbFile[] array = new UsbFile[list.size()];
array = list.toArray(array);
return array;
}
Aggregations