{"id":17345818,"url":"https://github.com/Marinerer/file-access","last_synced_at":"2025-02-26T01:33:13.726Z","repository":{"id":212962109,"uuid":"732385358","full_name":"Meqn/file-access","owner":"Meqn","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":"2023-12-27T03:29:31.451Z","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/Meqn.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}},"created_at":"2023-12-16T14:00:15.000Z","updated_at":"2023-12-27T03:29:31.451Z","dependencies_parsed_at":"2023-12-21T13:29:22.857Z","dependency_job_id":null,"html_url":"https://github.com/Meqn/file-access","commit_stats":null,"previous_names":["meqn/file-access"],"tags_count":2,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meqn%2Ffile-access","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meqn%2Ffile-access/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meqn%2Ffile-access/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meqn%2Ffile-access/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Meqn","download_url":"https://codeload.github.com/Meqn/file-access/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219843287,"owners_count":16556508,"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":["fetch-files","file-access","read-file","read-file-into-buffer","read-file-sync"],"created_at":"2024-10-15T16:43:47.727Z","updated_at":"2025-02-26T01:33:08.395Z","avatar_url":"https://github.com/Meqn.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"}