Android.Test.Mock.MockContext.OpenFileOutput Method
Open a private file associated with this Context's application package for writing.

Syntax

[Android.Runtime.Register("openFileOutput", "(Ljava/lang/String;I)Ljava/io/FileOutputStream;", "GetOpenFileOutput_Ljava_lang_String_IHandler")]
public override System.IO.Stream OpenFileOutput (string name, [Android.Runtime.GeneratedEnum] Android.Content.FileCreationMode mode)

Parameters

name
The name of the file to open; can not contain path separators.
mode
Operating mode. Use 0 or Android.Content.Context.MODE_PRIVATE for the default operation, Android.Content.Context.MODE_APPEND to append to an existing file, Android.Content.Context.MODE_WORLD_READABLE and Android.Content.Context.MODE_WORLD_WRITEABLE to control permissions.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.IO.FileNotFoundException

Remarks

Open a private file associated with this Context's application package for writing. Creates the file if it doesn't already exist.

No permissions are required to invoke this method, since it uses internal storage.

[Android Documentation]

Requirements

Namespace: Android.Test.Mock
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1