Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

Update README.md #9

Merged
merged 1 commit into from
Nov 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ exists-sync
===========
[![Build Status](https://travis-ci.org/ember-cli/exists-sync.svg)](https://travis-ci.org/ember-cli/exists-sync) [![Build status](https://ci.appveyor.com/api/projects/status/c05xyb4s80pn66yo?svg=true)](https://ci.appveyor.com/project/embercli/exists-sync)

Replacement for [fs.existsSync()](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback), which is being deprecated:
Replacement for [fs.existsSync()](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) (which has been un-deprecated in Node.js since [6.8.0](https://github.com/nodejs/node/pull/8364)):

> "fs.exists() is an anachronism and exists only for historical reasons. There should almost never be a reason to use it in your own code.

> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to fs.exists() and fs.open(). Just open the file and handle the error when it's not there."

`exists-sync` will recursively follow symlinks to verify the target file exists, rather than giving a false positive on a symlink whose target has been removed.
`exists-sync` will recursively follow symlinks to verify the target file exists, rather than giving a false positive on a symlink whose target has been removed.