mirror of
https://github.com/revanced/jadb.git
synced 2025-05-22 19:08:52 +02:00
Refactor: Making RemoteFileRecord package local.
This commit is contained in:
parent
29c3a3956a
commit
e26de967bf
@ -70,12 +70,12 @@ public class JadbDevice {
|
||||
send("shell:" + shellLine.toString());
|
||||
}
|
||||
|
||||
public List<RemoteFileRecord> list(String remotePath) throws IOException, JadbException {
|
||||
public List<RemoteFile> list(String remotePath) throws IOException, JadbException {
|
||||
ensureTransportIsSelected();
|
||||
SyncTransport sync = transport.startSync();
|
||||
sync.send("LIST", remotePath);
|
||||
|
||||
List<RemoteFileRecord> result = new ArrayList<RemoteFileRecord>();
|
||||
List<RemoteFile> result = new ArrayList<RemoteFile>();
|
||||
for (RemoteFileRecord dent = sync.readDirectoryEntry(); dent != RemoteFileRecord.DONE; dent = sync.readDirectoryEntry())
|
||||
{
|
||||
result.add(dent);
|
||||
|
@ -3,7 +3,7 @@ package se.vidstige.jadb;
|
||||
/**
|
||||
* Created by vidstige on 2014-03-19.
|
||||
*/
|
||||
public class RemoteFileRecord extends RemoteFile{
|
||||
class RemoteFileRecord extends RemoteFile{
|
||||
public static final RemoteFileRecord DONE = new RemoteFileRecord(null, 0, 0, 0);
|
||||
|
||||
private final int mode;
|
||||
|
@ -8,7 +8,6 @@ import org.junit.Test;
|
||||
import se.vidstige.jadb.JadbDevice;
|
||||
import se.vidstige.jadb.JadbConnection;
|
||||
import se.vidstige.jadb.RemoteFile;
|
||||
import se.vidstige.jadb.RemoteFileRecord;
|
||||
|
||||
public class RealDeviceTestCases {
|
||||
|
||||
@ -32,8 +31,8 @@ public class RealDeviceTestCases {
|
||||
{
|
||||
JadbConnection jadb = new JadbConnection();
|
||||
JadbDevice any = jadb.getAnyDevice();
|
||||
List<RemoteFileRecord> files = any.list("/");
|
||||
for (RemoteFileRecord f : files)
|
||||
List<RemoteFile> files = any.list("/");
|
||||
for (RemoteFile f : files)
|
||||
{
|
||||
System.out.println(f.getPath());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user