{"id":19352822,"url":"https://github.com/thisconnect/fildes","last_synced_at":"2025-10-17T03:32:39.379Z","repository":{"id":1755308,"uuid":"44046801","full_name":"thisconnect/fildes","owner":"thisconnect","description":"Magicless helps working with file descriptors","archived":false,"fork":false,"pushed_at":"2023-01-06T02:23:10.000Z","size":692,"stargazers_count":8,"open_issues_count":17,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T06:22:10.197Z","etag":null,"topics":["filesystem","fs","promise"],"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/thisconnect.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":"2015-10-11T09:47:07.000Z","updated_at":"2025-07-01T06:20:01.000Z","dependencies_parsed_at":"2023-01-13T11:22:04.031Z","dependency_job_id":null,"html_url":"https://github.com/thisconnect/fildes","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/thisconnect/fildes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisconnect%2Ffildes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisconnect%2Ffildes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisconnect%2Ffildes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisconnect%2Ffildes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thisconnect","download_url":"https://codeload.github.com/thisconnect/fildes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisconnect%2Ffildes/sbom","scorecard":{"id":881623,"data":{"date":"2025-08-11","repo":{"name":"github.com/thisconnect/fildes","commit":"a30c487ae9841fb1ffc7e1b1f28e6f52781d7e32"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 30 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license:0","Info: FSF or OSI recognized license: MIT License: license:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"20 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T08:25:35.614Z","repository_id":1755308,"created_at":"2025-08-24T08:25:35.614Z","updated_at":"2025-08-24T08:25:35.614Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273100506,"owners_count":25045697,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["filesystem","fs","promise"],"created_at":"2024-11-10T04:40:34.047Z","updated_at":"2025-10-17T03:32:34.346Z","avatar_url":"https://github.com/thisconnect.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fildes\n\n[![NPM Version](https://img.shields.io/npm/v/fildes.svg?style=flat-square\u0026maxAge=1800)](https://www.npmjs.com/package/fildes)\n[![MIT](https://img.shields.io/npm/l/fildes.svg?style=flat-square\u0026maxAge=1800)](https://github.com/thisconnect/fildes/blob/master/license)\n\nProvides native promises for all file system methods involving file descriptors (FD), basically manages `fs.open` for you.\n\n\u003e file descriptor (FD, less frequently *fildes*)\n\n[en.wikipedia.org/wiki/File_descriptor](https://en.wikipedia.org/wiki/File_descriptor)\n\n[![Build Status](https://img.shields.io/circleci/project/github/thisconnect/fildes/master.svg?style=flat-square\u0026maxAge=1800\u0026logo=circleci)](https://circleci.com/gh/thisconnect/fildes)\n[![Build Status](https://img.shields.io/appveyor/ci/thisconnect/fildes/master.svg?style=flat-square\u0026maxAge=1800\u0026logo=appveyor)](https://ci.appveyor.com/project/thisconnect/fildes)\n[![Build Status](https://img.shields.io/travis/thisconnect/fildes/master.svg?style=flat-square\u0026maxAge=1800\u0026logo=travis)](https://travis-ci.org/thisconnect/fildes)\n[![Coverage Status](https://img.shields.io/codecov/c/github/thisconnect/fildes/master.svg?style=flat-square\u0026maxAge=1800)](https://codecov.io/gh/thisconnect/fildes)\n[![Dependencies](https://img.shields.io/librariesio/release/npm/fildes.svg?style=flat-square\u0026maxAge=1800)](https://libraries.io/github/thisconnect/fildes)\n\n\n## Usage\n\n`fildes` always return a new [Promise](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise)!\n\n```javascript\nconst { write } = require('fildes');\n\nwrite('./path/to/file.txt', 'The quick green fix')\n  .then(() =\u003e console.log('done!'))\n  .catch(console.error);\n```\n\n\n### Why?\n\n- I needed an API that returns Promises\n- provides smart defaults i.e. suitable flags for `open`, `read` and `write`, see [fildes/issues/1](https://github.com/thisconnect/fildes/issues/1)\n- creates a directories if flag is `w`, `w+`, `a` or `a+`\n- `open` is optional and useful for keeping the fd for multiple operations\n- uses no magic\n- some very popular node modules use `fs.exists()` which is deprecated…\n\n\u003e `fs.exists()` should not be used to check if a file exists before calling `fs.open()`. Doing so introduces a race condition since other processes may change the file's state between the two calls. Instead, user code should call `fs.open()` directly and handle the error raised if the file is non-existent.\n\n[fs.exists Stability: 0 - Deprecated](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) (Node.js v5.1.0 File System API)\n\n\n##### Bad (NOT RECOMMENDED)\n\n```javascript\nfs.exists('myfile', (exists) =\u003e {\n  if (exists) {\n    console.error('myfile already exists');\n  } else {\n    fs.open('myfile', 'wx', (err, fd) =\u003e {\n      if (err) throw err;\n      fs.write(fd, 'Hello', callback);\n    });\n  }\n});\n```\n\n\n##### Good (RECOMMENDED)\n\n```javascript\nfs.open('myfile', 'wx', (err, fd) =\u003e {\n  if (err) {\n    if (err.code === 'EEXIST') {\n      console.error('myfile already exists');\n      return;\n    }\n\n    throw err;\n  }\n\n  fs.write(fd, 'Hello', callback);\n});\n```\n\n\n##### Using `fildes`\n\n```javascript\nconst { open, write, close } = require('fildes');\n\nopen('myfile', { flag: 'wx' })\n  .then(fd =\u003e {\n    return write(fd, 'Hello')\n    .then(() =\u003e close(fd));\n  })\n  .catch(console.error);\n```\n\nThis is the same as:\n\n```javascript\nconst { write } = require('fildes');\n\nwrite('myfile', 'Hello', { flag: 'wx' })\n  .catch(console.error);\n```\n\n\n## Install\n\n```bash\nnpm i --save fildes\n```\n\n`fildes` with support for Node.js 4.x can be found here https://github.com/thisconnect/fildes/tree/v1.x\n\n\n## API\n\n- [access](https://github.com/thisconnect/fildes/tree/master/lib/access)\n- [appendFile](https://github.com/thisconnect/fildes/tree/master/lib/appendFile)\n- [chmod](https://github.com/thisconnect/fildes/tree/master/lib/chmod)\n- [chown](https://github.com/thisconnect/fildes/tree/master/lib/chown)\n- [close](https://github.com/thisconnect/fildes/tree/master/lib/close)\n- [link](https://github.com/thisconnect/fildes/tree/master/lib/link)\n- [mkdir](https://github.com/thisconnect/fildes/tree/master/lib/mkdir)\n- [open](https://github.com/thisconnect/fildes/tree/master/lib/open)\n- [read](https://github.com/thisconnect/fildes/tree/master/lib/read)\n- [readdir](https://github.com/thisconnect/fildes/tree/master/lib/readdir)\n- [readFile](https://github.com/thisconnect/fildes/tree/master/lib/readFile)\n- [rename](https://github.com/thisconnect/fildes/tree/master/lib/rename)\n- [rm](https://github.com/thisconnect/fildes/tree/master/lib/rm)\n- [stats](https://github.com/thisconnect/fildes/tree/master/lib/stats)\n- [symlink](https://github.com/thisconnect/fildes/tree/master/lib/symlink)\n- [sync](https://github.com/thisconnect/fildes/tree/master/lib/sync)\n- [truncate](https://github.com/thisconnect/fildes/tree/master/lib/truncate)\n- [unlink](https://github.com/thisconnect/fildes/tree/master/lib/unlink)\n- [utimes](https://github.com/thisconnect/fildes/tree/master/lib/utimes)\n- [write](https://github.com/thisconnect/fildes/tree/master/lib/write)\n- [writeFile](https://github.com/thisconnect/fildes/tree/master/lib/writeFile)\n\n\n### Examples\n\n- [Get the size of many files](https://github.com/thisconnect/fildes/tree/master/examples/get-sizes)\n- [List files](https://github.com/thisconnect/fildes/tree/master/examples/list-files)\n- [Keep file descriptor (FD) open and use multiple times](https://github.com/thisconnect/fildes/tree/master/examples/operate-on-fd)\n- [Read chunk of many files](https://github.com/thisconnect/fildes/tree/master/examples/read-chunks)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisconnect%2Ffildes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthisconnect%2Ffildes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisconnect%2Ffildes/lists"}