Compartilhar via


Context.GetFileStreamPath(String) Method

Definition

Returns the absolute path on the filesystem where a file created with #openFileOutput is stored.

[Android.Runtime.Register("getFileStreamPath", "(Ljava/lang/String;)Ljava/io/File;", "GetGetFileStreamPath_Ljava_lang_String_Handler")]
public abstract Java.IO.File? GetFileStreamPath (string? name);
[<Android.Runtime.Register("getFileStreamPath", "(Ljava/lang/String;)Ljava/io/File;", "GetGetFileStreamPath_Ljava_lang_String_Handler")>]
abstract member GetFileStreamPath : string -> Java.IO.File

Parameters

name
String

The name of the file for which you would like to get its path.

Returns

An absolute path to the given file.

Attributes

Remarks

Returns the absolute path on the filesystem where a file created with #openFileOutput is stored.

The returned path may change over time if the calling app is moved to an adopted storage device, so only relative paths should be persisted.

Java documentation for android.content.Context.getFileStreamPath(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

See also

  • <xref:Android.Content.Context.OpenFileOutput(System.String%2c+Android.Content.FileCreationMode)>
  • FilesDir
  • <xref:Android.Content.Context.GetDir(System.String%2c+Android.Content.FileCreationMode)>