{"id":15568968,"url":"https://github.com/dan-online/cabinet","last_synced_at":"2025-04-24T00:20:33.684Z","repository":{"id":41306857,"uuid":"272798656","full_name":"dan-online/cabinet","owner":"dan-online","description":"Cabinet, the easier way to manage files in Deno","archived":false,"fork":false,"pushed_at":"2023-12-03T08:40:48.000Z","size":16395,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T16:46:18.160Z","etag":null,"topics":["cabinet","deno","denoland","file","filemanager","files","filesystem"],"latest_commit_sha":null,"homepage":"https://cabinet-benchmarks.netlify.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dan-online.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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},"funding":{"github":["dan-online"]}},"created_at":"2020-06-16T19:49:48.000Z","updated_at":"2024-05-01T16:46:18.161Z","dependencies_parsed_at":"2024-10-02T17:21:42.490Z","dependency_job_id":"a77b8640-818c-4428-833e-135fb24d6db2","html_url":"https://github.com/dan-online/cabinet","commit_stats":{"total_commits":107,"total_committers":2,"mean_commits":53.5,"dds":0.009345794392523366,"last_synced_commit":"f721e470ae6cd527e8b95f9da952f493c84f2083"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-online%2Fcabinet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-online%2Fcabinet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-online%2Fcabinet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-online%2Fcabinet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dan-online","download_url":"https://codeload.github.com/dan-online/cabinet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250535965,"owners_count":21446649,"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":["cabinet","deno","denoland","file","filemanager","files","filesystem"],"created_at":"2024-10-02T17:21:40.054Z","updated_at":"2025-04-24T00:20:33.638Z","avatar_url":"https://github.com/dan-online.png","language":"TypeScript","funding_links":["https://github.com/sponsors/dan-online"],"categories":[],"sub_categories":[],"readme":"\u003e Cabinet, the easier way to manage files in Deno\n\n\u003cimg src=\"https://raw.githubusercontent.com/dan-online/cabinet/master/src/assets/logo.png\" width=\"200px\"\u003e\n\n# Cabinet\n\nA module created for [Deno](https://deno.land) by [DanCodes](https://dancodes.online)\n\n![.github/workflows/deno-win.yml](https://github.com/dan-online/cabinet/workflows/.github/workflows/deno-win.yml/badge.svg)\n![.github/workflows/deno-linux.yml](https://github.com/dan-online/cabinet/workflows/.github/workflows/deno-linux.yml/badge.svg)\n![.github/workflows/deno-mac.yml](https://github.com/dan-online/cabinet/workflows/.github/workflows/deno-mac.yml/badge.svg)\n[![DanCodes Discord](https://img.shields.io/discord/478586684666150934?color=%237289DA\u0026label=discord%20support\u0026logo=discord\u0026logoColor=%23fff)](https://discord.gg/fdpcZAA)\n![GitHub repo size](https://img.shields.io/github/repo-size/dan-online/cabinet)\n![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/dan-online/cabinet)\n[![Docs](https://img.shields.io/badge/deno-docs-green?logo=deno\u0026color=informational)](https://doc.deno.land/https/deno.land/x/cabinet/mod.ts)\n[![Docs](https://img.shields.io/badge/deno-module-red?logo=deno)](https://deno.land/x/cabinet)\n[![nest badge](https://nest.land/badge-block.svg)](https://nest.land/package/cabinet)\n\n### Demo\n\nThis demo will open a file called testing.txt, write to it and then finally read it and display the contents in the console.\n\n```bash\ndeno run --allow-write --allow-read https://deno.land/x/cabinet/demo.ts\n```\n\n### Todo\n\n- Add file moving\n- Add resolve function for stringified file\n\n### Testing\n\n```bash\ndeno test -A\n```\n\n### Use\n\n```typescript\nimport {\n  Cabinet,\n  CabinetFile,\n  CabinetError,\n} from \"https://deno.land/x/cabinet/mod.ts\";\n\nconst file = new Cabinet(\"./testing.txt\");\n\nfile.write(\"The date is \" + new Date());\n\nfile.write(\"The date is \" + new Date(), () =\u003e console.log(\"finished!\"));\n\nfile.writer.sync(\"This was written synchronously\");\n\nfile.writer\n  .promise(\"This was written with a promise\")\n  .then(() =\u003e console.log(\"finished!\"));\n\nfile.writer.callback(\"This was written with a callback\", () =\u003e\n  console.log(\"finished!\")\n);\n\nfile.read();\n\nfile.read(() =\u003e console.log(\"finished!\"));\n\nfile.reader.sync();\n\nfile.reader.promise().then((cFile: CabinetFile) =\u003e {\n  console.log(\"read \" + cFile.size.mb + \"mb in promise\");\n});\n\nfile.reader.callback((err?: CabinetError, cFile?: CabinetFile) =\u003e {\n  console.log(\"read \" + cFile?.size.mb + \"mb in callback\");\n});\n```\n\n## Format code\n\n```bash\ndeno fmt **/*.ts\n```\n\n## Resources\n\n- [Deno Website](https://deno.land)\n- [Deno Style Guide](https://deno.land/std/style_guide.md)\n- [Deno Gitter](https://gitter.im/denolife/Lobby)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan-online%2Fcabinet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdan-online%2Fcabinet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan-online%2Fcabinet/lists"}