{"id":15653792,"url":"https://github.com/stevenvachon/hidefile","last_synced_at":"2025-07-08T04:37:06.642Z","repository":{"id":19231995,"uuid":"22466617","full_name":"stevenvachon/hidefile","owner":"stevenvachon","description":"Hide files and directories on all platforms.","archived":false,"fork":false,"pushed_at":"2020-06-01T01:09:31.000Z","size":43,"stargazers_count":29,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T00:37:28.896Z","etag":null,"topics":["cross-platform","filesystem","nix","nodejs","windows"],"latest_commit_sha":null,"homepage":"","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/stevenvachon.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-07-31T11:15:54.000Z","updated_at":"2024-10-20T00:49:35.000Z","dependencies_parsed_at":"2022-08-01T03:18:47.599Z","dependency_job_id":null,"html_url":"https://github.com/stevenvachon/hidefile","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stevenvachon/hidefile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fhidefile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fhidefile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fhidefile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fhidefile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevenvachon","download_url":"https://codeload.github.com/stevenvachon/hidefile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fhidefile/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261249783,"owners_count":23130494,"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":["cross-platform","filesystem","nix","nodejs","windows"],"created_at":"2024-10-03T12:47:04.162Z","updated_at":"2025-07-08T04:37:06.583Z","avatar_url":"https://github.com/stevenvachon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hidefile [![NPM Version][npm-image]][npm-url] [![Linux Build][travis-image]][travis-url] [![Windows Build][appveyor-image]][appveyor-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependency Monitor][greenkeeper-image]][greenkeeper-url]\n\n\u003e Hide files and directories on all platforms.\n\nUnix:\n* Adds or removes a \".\" prefix on a file or dir\n\nWindows:\n* Adds or removes a \".\" prefix on a file or dir\n* Adds or removes the \"hidden\" attribute on a file or dir\n\nA native binding is used, offering great performance. As a contingency in case that fails, functionality will silently revert to a command line, though it is considerably slower.\n\n\n## Installation\n\n[Node.js](http://nodejs.org/) `\u003e= 8` is required. To install, type this at the command line:\n```\nnpm install hidefile\n```\n\n\n## Methods\n\n### `hide(path, callback)`\n`path` - Path to file or directory  \n`callback(err,newpath)` - A callback which is called upon completion  \n```js\nhidefile.hide('path/to/file.ext', (err, newpath) =\u003e {\n  if (err == null) {\n    console.log(newpath);  //-\u003e 'path/to/.file.ext'\n  }\n});\n```\n\n### `hideSync(path)`\n`path` - Path to file or directory  \n\nThrows an error if the file or dir cannot be found/accessed.\n```js\nconst newpath = hidefile.hideSync('path/to/file.ext');\n\nconsole.log(newpath);  //-\u003e 'path/to/.file.ext'\n```\n\n### `isDotPrefixed(path)`\n`path` - Path to file or directory  \n```js\nconsole.log( hidefile.isDotPrefixed('path/to/.file.ext') );  //-\u003e true\nconsole.log( hidefile.isDotPrefixed('path/to/file.ext') );   //-\u003e false\n```\n\n### `isHidden(path, callback)`\n`path` - Path to file or directory  \n`callback(result)` - A callback which is called upon completion  \n```js\nhidefile.isHidden('path/to/file.ext', (err, result) =\u003e {\n  if (err == null) {\n    console.log(result);  //-\u003e false\n  }\n});\n```\nUnix: `result` is `true` if prefixed.  \nWindows: `result` is `true` if prefixed *and* has \"hidden\" attribute, `false` if only prefixed.  \n\n### `isHiddenSync(path)`\n`path` - Path to file or directory  \n\nThrows an error if the file or dir cannot be found/accessed.\n```js\nconst result = hidefile.isHiddenSync('path/to/file.ext');\n\nconsole.log(result);  //-\u003e false\n```\n\n### `reveal(path, callback)`\n`path` - Path to file or directory  \n`callback(err,newpath)` - A callback which is called upon completion  \n```js\nhidefile.reveal('path/to/.file.ext', (err, newpath) =\u003e {\n  if (err == null) {\n    console.log(newpath);  //-\u003e 'path/to/file.ext'\n  }\n});\n```\n\n### `revealSync(path)`\n`path` - Path to file or directory  \n\nThrows an error if the file or dir cannot be found/accessed.\n```js\nconst newpath = hidefile.revealSync('path/to/.file.ext');\n\nconsole.log(newpath);  //-\u003e 'path/to/file.ext'\n```\n\n### `shouldBeHidden(path, callback)`\n`path` - Path to file or directory  \n`callback(result)` - A callback which is called upon completion  \n```js\nif (isWindows) {\n  hidefile.shouldBeHidden('path/to/.file.ext', (err, result) =\u003e {\n    if (err == null) {\n      console.log(result);  //-\u003e true\n    }\n  });\n}\n```\nUnix: `result` is `true` if prefixed.  \nWindows: `result` is `true` if prefixed *or* has \"hidden\" attribute.  \n\n### `shouldBeHiddenSync(path)`\n`path` - Path to file or directory  \n\nThrows an error if the file or dir cannot be found/accessed.\n```js\nif (isWindows) {\n  result = hidefile.shouldBeHiddenSync('path/to/.file.ext');\n\n  console.log(result);  //-\u003e true\n}\n```\n\n\n[npm-image]: https://img.shields.io/npm/v/hidefile.svg\n[npm-url]: https://npmjs.com/package/hidefile\n[travis-image]: https://img.shields.io/travis/stevenvachon/hidefile.svg?label=linux\n[travis-url]: https://travis-ci.org/stevenvachon/hidefile\n[appveyor-image]: https://img.shields.io/appveyor/ci/stevenvachon/hidefile.svg?label=windows\n[appveyor-url]: https://ci.appveyor.com/project/stevenvachon/hidefile\n[coveralls-image]: https://img.shields.io/coveralls/stevenvachon/hidefile.svg\n[coveralls-url]: https://coveralls.io/github/stevenvachon/hidefile\n[greenkeeper-image]: https://badges.greenkeeper.io/stevenvachon/hidefile.svg\n[greenkeeper-url]: https://greenkeeper.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenvachon%2Fhidefile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevenvachon%2Fhidefile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenvachon%2Fhidefile/lists"}