-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FileSystem.Unix: Directory.Delete: remove per item syscall. (#59520)
* FileSystem.Unix: Directory.Delete: remove per item syscall. By recursing using FileSystemEnumerable we know the file type and can omit the stat calls made by DirectoryInfo.Exists. For the top level path, we can omit the call also and handle non-directories when rmdir errno is ENOTDIR. For the recursive case we can avoid recursion when the top level path rmdir succeeds immediately. FileSystemEntry is updated so IsSymbolicLink remembers the file is symbolic link and does not make a syscall for it.
- Loading branch information
Showing
2 changed files
with
97 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters