# exists-sync

> existsSync that also checks for symlinks

Latest version **0.1.0** (published 2018-04-03) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install exists-sync
pnpm add exists-sync
yarn add exists-sync
bun add exists-sync
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-04-03 |
| First published | 2015-06-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Jake Bixby |
| Maintainers | ember-cli, nathanhammond, rwjblue, stefanpenner, trabus, turbo87 |
| Keywords | fs, existsSync, exists, lstatSync |

## Links

- npm: https://www.npmjs.com/package/exists-sync
- Repository: https://github.com/ember-cli/exists-sync
- Homepage: https://github.com/ember-cli/exists-sync#readme
- Issues: https://github.com/ember-cli/exists-sync/issues
- npm.io page: https://npm.io/package/exists-sync

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2018-04-03
- 0.0.4 — 2016-11-04
- 0.0.3 — 2015-06-20
- 0.0.2 — 2015-06-19
- 0.0.1 — 2015-06-15

## README

exists-sync [DEPRECATED]
===========
[![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)


This project is deprecated, please continue to use `fs.existsSync` as its deprecation is no more.

----

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.

---
_Source: https://npm.io/package/exists-sync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
