dotnet / dotnet/dotnet-api-docs

DirectoryInfo.Exists remarks should mention similar warning as FileInfo.Exists

Open
#6,746 1 comment 0 reactions 0 assignees View on GitHub
area-System.IO Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

`FileInfo.Exists` mentions that on creation, the `FileInfo` instance will check if the file exists or not. Any additional manipulations require calling `Refresh` beforehand, to ensure we acquire the latest information on the file. For example, to check if the file has been deleted or renamed by an external process.

We need a similar remark in `DirectoryInfo.Exists` because the behavior is expected to be similar.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.