{"id":20430809,"url":"https://github.com/alexbinary/file-exists","last_synced_at":"2025-07-30T02:06:31.793Z","repository":{"id":57096363,"uuid":"75590512","full_name":"alexbinary/file-exists","owner":"alexbinary","description":"Simple and consistent way to check if a file exists 🔎","archived":false,"fork":false,"pushed_at":"2016-12-29T10:45:01.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-23T19:42:24.752Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexbinary.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-05T05:03:43.000Z","updated_at":"2016-12-05T05:05:09.000Z","dependencies_parsed_at":"2022-08-22T21:40:29.165Z","dependency_job_id":null,"html_url":"https://github.com/alexbinary/file-exists","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbinary%2Ffile-exists","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbinary%2Ffile-exists/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbinary%2Ffile-exists/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexbinary%2Ffile-exists/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexbinary","download_url":"https://codeload.github.com/alexbinary/file-exists/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241975135,"owners_count":20051428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T08:09:11.338Z","updated_at":"2025-03-05T05:43:20.095Z","avatar_url":"https://github.com/alexbinary.png","language":"JavaScript","readme":"# file-exists\n\nSimple and consistent way to check if a file exists 🔎\n\n[![npm](https://img.shields.io/npm/v/@alexbinary/file-exists.svg)](https://www.npmjs.com/package/@alexbinary/file-exists)\n[![GitHub release](https://img.shields.io/github/release/alexbinary/file-exists.svg?label=\"github\")](https://github.com/alexbinary/file-exists/releases/latest)\n[![Build Status](https://travis-ci.org/alexbinary/file-exists.svg)](https://travis-ci.org/alexbinary/file-exists)\n[![dependencies Status](https://david-dm.org/alexbinary/file-exists/status.svg)](https://david-dm.org/alexbinary/file-exists)\n[![devDependencies Status](https://david-dm.org/alexbinary/file-exists/dev-status.svg)](https://david-dm.org/alexbinary/file-exists?type=dev)\n\nUses [@alexbinary/promisify](https://www.npmjs.com/package/@alexbinary/promisify) by [alexbinary](https://www.npmjs.com/~alexbinary)\n\n## Install\n\nInstall using npm or yarn :\n\n```bash\n$ npm install @alexbinary/file-exists\n# or\n$ yarn add @alexbinary/file-exists\n```\n\n## Usage\n\n```javascript\nlet fileexists = require('@alexbinary/file-exists')\n\n// callback\nfileexists('/path/to/file', (err, exists) =\u003e {\n  console.log('file exists: ' + (exists ? 'yes' : 'no'))\n})\n\n// promise\nfileexists('/path/to/file').then((exists) =\u003e {\n  console.log('file exists: ' + (exists ? 'yes' : 'no'))\n})\n\n// sync\nlet exists = fileexists.sync('/path/to/file')\nconsole.log('file exists: ' + (exists ? 'yes' : 'no'))\n```\n\n## Documentation\n\n```javascript\nlet fileexists = require('@alexbinary/file-exists')\n```\n\n### fileexists(filepath)\n\nChecks if a file exists at `filepath`.\n\nThis method supports both Promise and node callback style, and resolves with a `boolean` `true` if the file exists, `false` otherwise.\n\n### fileexists.sync(filepath)\n\nSynchronous version. Return `boolean` `true` if the file exists, `false` otherwise.\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexbinary%2Ffile-exists","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexbinary%2Ffile-exists","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexbinary%2Ffile-exists/lists"}