{"id":18055744,"url":"https://github.com/marinerer/file-access","last_synced_at":"2025-08-11T14:51:54.045Z","repository":{"id":212962109,"uuid":"732385358","full_name":"Marinerer/file-access","owner":"Marinerer","description":"Easily fetch local or remote file, and return buffer data.","archived":false,"fork":false,"pushed_at":"2023-12-26T03:50:18.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T09:28:22.667Z","etag":null,"topics":["fetch-files","file-access","read-file","read-file-into-buffer","read-file-sync"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Marinerer.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-16T14:00:15.000Z","updated_at":"2023-12-17T15:32:24.000Z","dependencies_parsed_at":"2024-10-30T00:19:21.734Z","dependency_job_id":null,"html_url":"https://github.com/Marinerer/file-access","commit_stats":null,"previous_names":["meqn/file-access","marinerer/file-access"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Marinerer/file-access","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marinerer%2Ffile-access","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marinerer%2Ffile-access/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marinerer%2Ffile-access/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marinerer%2Ffile-access/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marinerer","download_url":"https://codeload.github.com/Marinerer/file-access/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marinerer%2Ffile-access/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269906379,"owners_count":24494329,"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-08-11T02:00:10.019Z","response_time":75,"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":["fetch-files","file-access","read-file","read-file-into-buffer","read-file-sync"],"created_at":"2024-10-31T01:11:47.665Z","updated_at":"2025-08-11T14:51:53.989Z","avatar_url":"https://github.com/Marinerer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# file-access\n\n[![version](https://img.shields.io/npm/v/file-access?style=flat-square)](https://www.npmjs.com/package/file-access)\n[![Codecov](https://img.shields.io/codecov/c/github/meqn/file-access?token=1498G3HFKJ\u0026style=flat-square\u0026logo=codecov)](https://codecov.io/gh/Meqn/file-access)\n[![release](https://img.shields.io/github/actions/workflow/status/meqn/file-access/release.yml?style=flat-square)](https://github.com/Meqn/pipflow/releases)\n[![node.js](https://img.shields.io/node/v/file-access?style=flat-square\u0026logo=nodedotjs)](https://nodejs.org/en/about/releases/)\n[![languages](https://img.shields.io/github/languages/top/meqn/file-access?style=flat-square)](https://github.com/Meqn/file-access)\n\n\n\nEasily fetch local or remote file, and return buffer data.\n\n\u003e Not suitable for accessing large files\n\n轻松获取本地或远程文件, 并返回buffer数据。(不适用于大文件)\n\n\n## Usage\n\n```js\nconst {\n  accessFile,\n  accessLocalFileSync\n} = require('file-access');\n\n\naccessFile('/path/to/local.txt', (err, data) =\u003e {\n  // ...\n})\n\naccessFile('https://example.com/file.zip').then((data) =\u003e {\n  // ...\n  console.log('file size : ', data.byteLength)\n  conosle.log('content-type :', data.contentType)\n})\n\nconst buffer = accessLocalFileSync('/path/to/local.txt')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarinerer%2Ffile-access","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarinerer%2Ffile-access","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarinerer%2Ffile-access/lists"}