FileListingService.FileEntry

public static final class FileListingService.FileEntry
extends Object

java.lang.Object
   ↳ com.android.ddmlib.FileListingService.FileEntry


ディレクトリ内のエントリを表します。ファイルまたはディレクトリを指定できます。

概要

パブリック コンストラクタ

FileEntry(FileListingService.FileEntry parent, String name, int type, boolean isRoot)

新しいファイル エントリを作成します。

パブリック メソッド

static String escape(String entryName)

エントリ名のエスケープされたバージョンを返します。

FileListingService.FileEntry findChild(String name)

名前と一致する子 FileEntry を返します。

FileEntry[] getCachedChildren()

エントリのキャッシュに保存された子を返します。

String getDate()

ls によって返されるエントリの日付文字列を返します。

String getFullEscapedPath()

エントリの完全にエスケープされたパスを返します。

String getFullPath()

エントリのフルパスを返します。

String getGroup()

ls によって返されるエントリのグループ オーナーを返します。

String getInfo()

エントリの追加情報を返します。

String getName()

エントリの名前を返します。

String getOwner()

ls によって返されるエントリの所有者文字列を返します。

FileListingService.FileEntry getParent()

親エントリを返します。

String[] getPathSegments()

パスをセグメントのリストとして返します。

String getPermissions()

ls によって返されるエントリの権限文字列を返します。

String getSize()

ls によって返されるエントリのサイズ文字列を返します。

int getSizeValue()

エントリのサイズを返します。

String getTime()

ls によって返されるエントリの時刻文字列を返します。

int getType()

エントリタイプを int として返します。これは TYPE_(...) 定数のいずれかに一致します。

boolean isAppFileName()

ファイル名がアプリケーション パッケージ名かどうかを返します。

boolean isApplicationPackage()

エントリが有効なアプリケーション パッケージであるかどうかを返します。

boolean isDirectory()

エントリがフォルダか、フォルダへのリンクかを返します。

boolean isRoot()

エントリがルートかどうかを返します。

void setType(int type)

新しいタイプを設定します。

保護されたメソッド

void fillPathBuilder(StringBuilder pathBuilder, boolean escapePath)

pathBuilder にフルパスを再帰的に入力します。

void fillPathSegments( list)

セグメント リストに完全なパスを再帰的に入力します。

パブリック コンストラクタ

FileEntry

public FileEntry (FileListingService.FileEntry parent, 
                String name, 
                int type, 
                boolean isRoot)

新しいファイル エントリを作成します。

パラメータ
parent FileListingService.FileEntry: 親エントリ。エントリがルートの場合は null

name String: エントリの名前。

type int: エントリ タイプ。FileListingService.TYPE_FILEFileListingService.TYPE_DIRECTORYFileListingService.TYPE_OTHER のいずれか。

isRoot boolean: ルート ディレクトリかどうか。

パブリック メソッド

エスケープ

public static String escape (String entryName)

エントリ名のエスケープ バージョンを返します。

戻り値
String

findChild

public FileListingService.FileEntry findChild (String name)

名前に一致する子 FileEntry を返します。これは、キャッシュに保存された子リストを使用します。

パラメータ
name String: 返す子どもの名前。

戻り値
FileListingService.FileEntry 名前と一致する FileEntry、または null。

getCachedChildren

public FileEntry[] getCachedChildren ()

エントリのキャッシュに保存された子を返します。これは、FileListingService.getChildren() の呼び出しで作成されたキャッシュを返します。

戻り値
FileEntry[]

getDate

public String getDate ()

ls によって返されるエントリの日付文字列を返します。

戻り値
String

getFullEscapedPath

public String getFullEscapedPath ()

エントリの完全にエスケープされたパスを返します。このパスはシェル コマンドラインで安全に使用できます。

戻り値
String 区切り文字として FileListingService.FILE_SEPARATOR を使用するパス文字列

getFullPath

public String getFullPath ()

エントリのフルパスを返します。

戻り値
String FileListingService.FILE_SEPARATOR を区切り文字として使用するパス文字列。

getGroup

public String getGroup ()

ls によって返されるエントリのグループ オーナーを返します。

戻り値
String

getInfo

public String getInfo ()

エントリの追加情報を返します。

リンクの場合は、リンクの説明になります。

アプリの apk ファイルの場合、パッケージ マネージャーから返されるアプリ パッケージになります。

戻り値
String

getName

public String getName ()

エントリの名前を返します

戻り値
String

getOwner

public String getOwner ()

ls によって返されるエントリの所有者文字列を返します。

戻り値
String

getParent

public FileListingService.FileEntry getParent ()

親エントリを返します。

戻り値
FileListingService.FileEntry

getPathSegments

public String[] getPathSegments ()

パスをセグメントのリストとして返します。

戻り値
String[]

getPermissions

public String getPermissions ()

ls によって返されるエントリの権限文字列を返します。

戻り値
String

getSize

public String getSize ()

ls によって返されるエントリのサイズ文字列を返します。

戻り値
String

getSizeValue

public int getSizeValue ()

エントリのサイズを返します。

戻り値
int

getTime

public String getTime ()

ls によって返されるエントリの時刻文字列を返します。

戻り値
String

getType

public int getType ()

エントリタイプを int として返します。これは TYPE_(...) 定数のいずれかに一致します。

戻り値
int

isAppFileName

public boolean isAppFileName ()

ファイル名がアプリケーション パッケージ名かどうかを返します。

戻り値
boolean

isApplicationPackage

public boolean isApplicationPackage ()

エントリが有効なアプリケーション パッケージであるかどうかを返します。

戻り値
boolean

isDirectory

public boolean isDirectory ()

エントリがフォルダか、フォルダへのリンクかを返します。

戻り値
boolean

isRoot

public boolean isRoot ()

エントリがルートかどうかを返します。

戻り値
boolean

setType

public void setType (int type)

新しいタイプを設定します。

パラメータ
type int

保護されたメソッド

fillPathBuilder

protected void fillPathBuilder (StringBuilder pathBuilder, 
                boolean escapePath)

pathBuilder にフルパスを再帰的に入力します

パラメータ
pathBuilder StringBuilder: パスの作成に使用される StringBuilder。

escapePath boolean: シェル コマンドラインで使用するためにパスをエスケープする必要があるかどうか。

fillPathSegments

protected void fillPathSegments ( list)

セグメント リストに完全なパスを再帰的に入力します。

パラメータ
list : 塗りつぶすセグメントのリスト。