FileEntryWrapper

class FileEntryWrapper
extends Object implements IFileEntry

java.lang.Object
   ↳ com.android.tradefed.device.FileEntryWrapper


Implementation of a IFileEntry.

Summary

Public methods

IFileEntry findChild(String name)

Finds a child IFileEntry with given name.

Collection<IFileEntry> getChildren(boolean useCache)

Returns the children of a IFileEntry.

String getDate()

Wrapper for FileListingService.FileEntry.getDate().

FileListingService.FileEntry getFileEntry()

Return reference to the ddmlib FileListingService.FileEntry.

String getFullEscapedPath()

Wrapper for FileListingService.FileEntry.getFullEscapedPath().

String getFullPath()

Wrapper for FileListingService.FileEntry.getFullPath().

String getName()

Wrapper for FileListingService.FileEntry.getName().

String getPermissions()

Wrapper for FileListingService.FileEntry.getPermissions().

String getTime()

Wrapper for FileListingService.FileEntry.getTime().

boolean isAppFileName()

Wrapper for FileListingService.FileEntry.isAppFileName().

boolean isDirectory()

Wrapper for FileListingService.FileEntry.isDirectory().

Public methods

findChild

public IFileEntry findChild (String name)

Finds a child IFileEntry with given name.

Basically a wrapper for FileListingService.FileEntry.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

getChildren

public Collection<IFileEntry> getChildren (boolean useCache)

Returns the children of a IFileEntry.

Basically a synchronous wrapper for FileListingService.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

getDate

public String getDate ()

Wrapper for FileListingService.FileEntry.getDate().

Returns
String

getFileEntry

public FileListingService.FileEntry getFileEntry ()

Return reference to the ddmlib FileListingService.FileEntry.

Returns
FileListingService.FileEntry

getFullEscapedPath

public String getFullEscapedPath ()

Wrapper for FileListingService.FileEntry.getFullEscapedPath().

Returns
String

getFullPath

public String getFullPath ()

Wrapper for FileListingService.FileEntry.getFullPath().

Returns
String

getName

public String getName ()

Wrapper for FileListingService.FileEntry.getName().

Returns
String

getPermissions

public String getPermissions ()

Wrapper for FileListingService.FileEntry.getPermissions().

Returns
String

getTime

public String getTime ()

Wrapper for FileListingService.FileEntry.getTime().

Returns
String

isAppFileName

public boolean isAppFileName ()

Wrapper for FileListingService.FileEntry.isAppFileName().

Returns
boolean

isDirectory

public boolean isDirectory ()

Wrapper for FileListingService.FileEntry.isDirectory().

Returns
boolean