to top
public interface

IFileEntry

com.android.tradefed.device.IFileEntry
Known Indirect Subclasses

Class Overview

Interface definition that provides simpler, mockable contract to FileListingService.FileEntry methods.

TODO: move this into ddmlib

Summary

Public Methods
abstract IFileEntry findChild(String name)
Finds a child IFileEntry with given name.
abstract Collection<IFileEntry> getChildren(boolean useCache)
Returns the children of a IFileEntry.
abstract String getDate()
Wrapper for getDate().
abstract FileListingService.FileEntry getFileEntry()
Return reference to the ddmlib FileListingService.FileEntry.
abstract String getFullEscapedPath()
abstract String getFullPath()
Wrapper for getFullPath().
abstract String getName()
Wrapper for getName().
abstract String getPermissions()
Wrapper for getPermissions().
abstract String getTime()
Wrapper for getTime().
abstract boolean isAppFileName()
Wrapper for isAppFileName().
abstract boolean isDirectory()
Wrapper for isDirectory().

Public Methods

public abstract IFileEntry findChild (String name)

Finds a child IFileEntry with given name.

Basically a wrapper for findChild(String) that will also first search the cached children for file with given name, and if not found, refresh the cached child file list and attempt again.

Parameters
name String
Returns
IFileEntry
Throws
DeviceNotAvailableException

public abstract Collection<IFileEntry> getChildren (boolean useCache)

Returns the children of a IFileEntry.

Basically a synchronous wrapper for getChildren(FileEntry, boolean, FileListingService.IListingReceiver)

Parameters
useCache boolean: true if the cached children should be returned if available. false if a new ls command should be forced.
Returns
Collection<IFileEntry> list of sub files
Throws
DeviceNotAvailableException

public abstract String getDate ()

Wrapper for getDate().

Returns
String

public abstract FileListingService.FileEntry getFileEntry ()

Return reference to the ddmlib FileListingService.FileEntry.

Returns
FileListingService.FileEntry

public abstract String getFullEscapedPath ()

Wrapper for getFullEscapedPath().

Returns
String

public abstract String getFullPath ()

Wrapper for getFullPath().

Returns
String

public abstract String getName ()

Wrapper for getName().

Returns
String

public abstract String getPermissions ()

Wrapper for getPermissions().

Returns
String

public abstract String getTime ()

Wrapper for getTime().

Returns
String

public abstract boolean isAppFileName ()

Wrapper for isAppFileName().

Returns
boolean

public abstract boolean isDirectory ()

Wrapper for isDirectory().

Returns
boolean