Share via


IPath.ToFile Method

Definition

Returns a File object representing this path.

[Android.Runtime.Register("toFile", "()Ljava/io/File;", "GetToFileHandler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public Java.IO.File? ToFile ();
[<Android.Runtime.Register("toFile", "()Ljava/io/File;", "GetToFileHandler:Java.Nio.FileNio.IPathInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member ToFile : unit -> Java.IO.File

Returns

a File object representing this path

Attributes

Remarks

Returns a File object representing this path. Where this Path is associated with the default provider, then this method is equivalent to returning a File object constructed with the String representation of this path.

If this path was created by invoking the FileFile#toPath toPath method then there is no guarantee that the File object returned by this method is #equals equal to the original File.

Java documentation for java.nio.file.Path.toFile().

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