MCPcopy Index your code
hub / github.com/scottcorgan/file-exists

github.com/scottcorgan/file-exists @5.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 5.0.1 ↗ · + Follow
2 symbols 5 edges 2 files 0 documented · 0% 2 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

file-exists

Check if filepath exists and is a file. Returns false for directories.

(Requires node >=6.0.0)

Install

npm install file-exists --save

Usage

const fileExists = require('file-exists');

fileExists('/index.html', (err, exists) => console.log(exists)) // OUTPUTS: true or false

fileExists('/index.html').then(exists => {
  console.log(exists) // OUTPUTS: true or false
})

console.log(fileExists.sync('/index.html')) // OUTPUTS: true or false

Options

fileExists(filepath[, options, callback])

  • filepath - the path to the file to check if it exists
  • options - an object of options
  • root - the root directory to look in (or cwd)
  • callback(err, exists) - gets called when checking is done

fileExists.sync(filepath[, options])

  • filepath - the path to the file to check if it exists
  • options - an object of options
  • root - the root directory to look in (or cwd)

Run Tests

npm install
npm test

Core symbols most depended-on inside this repo

Shape

Function 2

Languages

TypeScript100%

Modules by API surface

index.js2 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add file-exists \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page