use of org.jnode.fs.FSEntry in project samourai-wallet-android by Samourai-Wallet.
the class UsbFileWrapper method list.
@Override
public String[] list() throws IOException {
if (dir == null) {
throw new UnsupportedOperationException("This is a file!");
}
List<String> list = new ArrayList<>();
Iterator<? extends FSEntry> iterator = dir.iterator();
while (iterator.hasNext()) {
FSEntry entry = iterator.next();
list.add(entry.getName());
}
String[] array = new String[list.size()];
array = list.toArray(array);
return array;
}
use of org.jnode.fs.FSEntry 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