Next: , Previous: , Up: EmacstとAndroid   [Contents][Index]


H.4 Androidでの他のプログラムからのファイルアクセス

Android 5.0 introduces a new sort of program, the “document provider”: these programs are small services that provide access to their own files independently of the asset manager and the Unix filesystem. Emacs supports accessing files and directories they provide, placing their files within the directory /content/storage.

これらのディレクトリーのいずれかへのアクセスが付与される前に、まずはEmacsがアクセスする権限を要求しなければなりません。これはコマンドandroid-request-directory-accessを実行(名前を指定してコマンドを実行するを参照)することにより達成されます。このコマンドによってファイル選択ダイアログを表示されます。

If a directory is selected from this dialog, its contents are subsequently made available within a new directory named /content/storage/authority/id, where authority is the name of the document provider, and id is a unique identifier assigned to the directory by the document provider.

Such a directory can be deleted once no longer required by providing its name to the command android-relinquish-directory-access.

これらのディレクトリーでサブプロセスを作成する際には、/assetsディレクトリー(AndroidでEmacsがアクセスできるファイルを参照)に課せられるのと同じ制限が適用されます(Unixファイルシステムには存在しないため)。これらのディレクトリーでEmacsが通常通り読み取りと書き込みが可能であっても、シンボリックリンクやハードリンクを作成することはできません。

ドキュメントプロバイダーはファイルコンテンツを取得するために高価なネットワーク処理を実行することが許されているので、これらのディレクトリーにあるファイルへのアクセス処理には有意な時間が費やされる可能性があります。

This page has generated for branch:work/master_4078d0fd3ee9e55c3da219aa6e7788ac6130697b, commit:d18a231220c4a6cb2583dcc09bf39ca635ef043f to check Japanese translation.