Partager via


ContentProvider.OpenFileHelper(Uri, String) Method

Definition

Convenience for subclasses that wish to implement #openFile by looking up a column named "_data" at the given URI.

[Android.Runtime.Register("openFileHelper", "(Landroid/net/Uri;Ljava/lang/String;)Landroid/os/ParcelFileDescriptor;", "")]
protected Android.OS.ParcelFileDescriptor OpenFileHelper (Android.Net.Uri uri, string mode);
[<Android.Runtime.Register("openFileHelper", "(Landroid/net/Uri;Ljava/lang/String;)Landroid/os/ParcelFileDescriptor;", "")>]
member this.OpenFileHelper : Android.Net.Uri * string -> Android.OS.ParcelFileDescriptor

Parameters

uri
Uri

The URI to be opened.

mode
String

The string representation of the file mode. Can be "r", "w", "wt", "wa", "rw" or "rwt". Please note the exact implementation of these may differ for each Provider implementation - for example, "w" may or may not truncate.

Returns

Returns a new ParcelFileDescriptor that can be used by the client to access the file.

Attributes

Exceptions

Remarks

Convenience for subclasses that wish to implement #openFile by looking up a column named "_data" at the given URI.

Java documentation for android.content.ContentProvider.openFileHelper(android.net.Uri, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to