Skip to content

Use fs.existsSync to check for cancellation - #36190

Merged
Andrew Casey (amcasey) merged 1 commit into
microsoft:masterfrom
amcasey:ExistsSync
Jan 15, 2020
Merged

Use fs.existsSync to check for cancellation#36190
Andrew Casey (amcasey) merged 1 commit into
microsoft:masterfrom
amcasey:ExistsSync

Conversation

@amcasey

Copy link
Copy Markdown
Member

Unlike statSync, it doesn't throw if the file doesn't exist, saving both time and allocations.

Unlike statSync, it doesn't throw if the file doesn't exist, saving both
time and allocations.
Comment threadsrc/cancellationToken/cancellationToken.ts
@amcasey
Andrew Casey (amcasey) merged commit a9cbea4 into microsoft:masterJan 15, 2020
Wenlu Wang (Kingwl) pushed a commit to Kingwl/TypeScript that referenced this pull request Mar 4, 2020
Unlike statSync, it doesn't throw if the file doesn't exist, saving both
time and allocations.
@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@amcasey@sheetalkamat