語言

Files.Exists(IPath, LinkOption[]) 方法

定義

測試檔案是否存在。

[Android.Runtime.Register("exists", "(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z", "", ApiSince=26)]
public static bool Exists(Java.Nio.FileNio.IPath? path, params Java.Nio.FileNio.LinkOption[]? options);
[<Android.Runtime.Register("exists", "(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z", "", ApiSince=26)>]
static member Exists : Java.Nio.FileNio.IPath * Java.Nio.FileNio.LinkOption[] -> bool

參數

path
IPath

要測試的檔案路徑

options
LinkOption[]

指示符號連結如何處理的選項。

傳回

true 如果該檔案存在; false 如果該檔案不存在或無法確定其存在。

屬性

備註

Java 文件 java.nio.file.Files.exists(java.nio.file.Path, java.nio.file.LinkOption)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於