ISecureDirectoryStream.DeleteFile(Object) Method

Definition

Deletes a file.

[Android.Runtime.Register("deleteFile", "(Ljava/lang/Object;)V", "GetDeleteFile_Ljava_lang_Object_Handler:Java.Nio.FileNio.ISecureDirectoryStreamInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public void DeleteFile (Java.Lang.Object? path);
[<Android.Runtime.Register("deleteFile", "(Ljava/lang/Object;)V", "GetDeleteFile_Ljava_lang_Object_Handler:Java.Nio.FileNio.ISecureDirectoryStreamInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member DeleteFile : Java.Lang.Object -> unit

Parameters

path
Object

the path of the file to delete

Attributes

Remarks

Deletes a file.

Unlike the Files#delete delete() method, this method does not first examine the file to determine if the file is a directory. Whether a directory is deleted by this method is system dependent and therefore not specified. If the file is a symbolic link, then the link itself, not the final target of the link, is deleted. When the parameter is a relative path then the file to delete is relative to this open directory.

Java documentation for java.nio.file.SecureDirectoryStream.deleteFile(T).

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