语言

FileSystemInfo.Exists 属性

定义

获取一个值,该值指示文件或目录是否存在。

public:
 abstract property bool Exists { bool get(); };
public abstract bool Exists { get; }
member this.Exists : bool
Public MustOverride ReadOnly Property Exists As Boolean

属性值

true 如果文件或目录存在,则为否则,为 false.

注解

有关常见 I/O 任务的列表,请参阅 常见 I/O 任务。

适用于

另请参阅