IFileEntry
public
interface
IFileEntry
| com.android.tradefed.device.IFileEntry |
接口定义,可为 FileEntry 方法提供更简单、可模拟的合约。
TODO:将此项移至 ddmlib
摘要
公共方法 | |
|---|---|
abstract
IFileEntry
|
findChild(String name)
查找具有指定名称的子 |
abstract
|
getChildren(boolean useCache)
返回 |
abstract
String
|
getDate()
|
abstract
FileListingService.FileEntry
|
getFileEntry()
返回对 ddmlib |
abstract
String
|
getFullEscapedPath()
|
abstract
String
|
getFullPath()
|
abstract
String
|
getName()
|
abstract
String
|
getPermissions()
|
abstract
String
|
getTime()
|
abstract
boolean
|
isAppFileName()
|
abstract
boolean
|
isDirectory()
|
公共方法
findChild
public abstract IFileEntry findChild (String name)
查找具有指定名称的子 IFileEntry。
基本上是 FileEntry.findChild(String) 的封装容器,它还会先在缓存的子文件中搜索指定名称的文件,如果找不到,则刷新缓存的子文件列表并重试。
| 参数 | |
|---|---|
name |
String |
| 返回 | |
|---|---|
IFileEntry |
|
| 抛出 | |
|---|---|
|
com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
|
getChildren
public abstractgetChildren (boolean useCache)
返回 IFileEntry 的子项。
基本上是 FileListingService.getChildren(FileEntry, boolean, FileListingService.IListingReceiver) 的同步封装容器
| 参数 | |
|---|---|
useCache |
boolean:如果应返回缓存的子项(如果有),则为 true。
false,如果应强制执行新的 ls 命令。 |
| 返回 | |
|---|---|
|
子文件列表 |
| 抛出 | |
|---|---|
|
com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
|
getFileEntry
public abstract FileListingService.FileEntry getFileEntry ()
返回对 ddmlib FileEntry 的引用。
| 返回 | |
|---|---|
FileListingService.FileEntry |
|
getFullEscapedPath
public abstract String getFullEscapedPath ()
FileEntry.getFullEscapedPath() 的封装容器。
| 返回 | |
|---|---|
String |
|