다음을 통해 공유


FileSystemProvider.DeleteIfExists(IPath) 메서드

정의

파일이 있는 경우 파일을 삭제합니다.

[Android.Runtime.Register("deleteIfExists", "(Ljava/nio/file/Path;)Z", "GetDeleteIfExists_Ljava_nio_file_Path_Handler", ApiSince=26)]
public virtual bool DeleteIfExists (Java.Nio.FileNio.IPath? path);
[<Android.Runtime.Register("deleteIfExists", "(Ljava/nio/file/Path;)Z", "GetDeleteIfExists_Ljava_nio_file_Path_Handler", ApiSince=26)>]
abstract member DeleteIfExists : Java.Nio.FileNio.IPath -> bool
override this.DeleteIfExists : Java.Nio.FileNio.IPath -> bool

매개 변수

path
IPath

삭제할 파일의 경로

반환

true 이 메서드에 의해 파일이 삭제되었으면 이고, false 파일이 없으므로 파일을 삭제할 수 없는 경우

특성

설명

파일이 있는 경우 파일을 삭제합니다. 이 메서드는 메서드에서 지정한 방식으로 정확하게 작동합니다 Files#deleteIfExists .

이 메서드의 기본 구현은 파일이 없을 때 무시를 NoSuchFileException 호출 #delete 합니다. 적절한 경우 재정의될 수 있습니다.

에 대한 java.nio.file.spi.FileSystemProvider.deleteIfExists(java.nio.file.Path)Java 설명서

이 페이지의 일부는 Android 오픈 소스 프로젝트에서 만들고 공유하고 Creative Commons 2.5 특성 라이선스에 설명된 용어에 따라 사용되는 작업을 기반으로 하는 수정 사항입니다.

적용 대상