{"id":16227764,"url":"https://github.com/akryum/reactive-fs","last_synced_at":"2025-03-19T13:31:11.728Z","repository":{"id":57348181,"uuid":"423561946","full_name":"Akryum/reactive-fs","owner":"Akryum","description":"Reactive file system interface","archived":false,"fork":false,"pushed_at":"2021-12-08T19:25:33.000Z","size":80,"stargazers_count":38,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T18:48:36.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Akryum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["Akryum"]}},"created_at":"2021-11-01T17:48:14.000Z","updated_at":"2023-05-15T02:44:53.000Z","dependencies_parsed_at":"2022-08-31T17:50:49.640Z","dependency_job_id":null,"html_url":"https://github.com/Akryum/reactive-fs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akryum%2Freactive-fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akryum%2Freactive-fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akryum%2Freactive-fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akryum%2Freactive-fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Akryum","download_url":"https://codeload.github.com/Akryum/reactive-fs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243989730,"owners_count":20379648,"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":[],"created_at":"2024-10-10T12:53:45.648Z","updated_at":"2025-03-19T13:31:10.113Z","avatar_url":"https://github.com/Akryum.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Akryum"],"categories":[],"sub_categories":[],"readme":"# reactive-fs\n\nA reactive filesystem interface based on Vue 3 reactivity system.\n\n```js\nimport { createReactiveFileSystem } from 'reactive-fs'\n\n// Create a reactive filesystem\nconst fs = await createReactiveFileSystem({\n  baseDir: __dirname,\n  glob: ['**/*.js'],\n  ignored: ['excluded'],\n})\n\n// List files\nfs.list()\nfs.list('.', { excludeSubDirectories: true })\nfs.list('sub')\n\n// List is reactive\nlet results = []\nfs.effect(() =\u003e {\n  // This will update `results` each time a file is added or removed\n  results = fs.list('.', { excludeSubDirectories: true }).sort()\n})\n\n// Create a file\nfs.createFile('foo.js', '')\n\n// Remove a file\nfs.files['foo.js'].remove()\n\n// Read a file\nconst content = await fs.files['meow.js'].waitForContent\n\n// `content` is a reactive property\nlet result\nfs.effect(() =\u003e {\n  result = fs.files['meow.js'].content\n})\n\n// Write to a file\nfs.files['meow.js'].content = 'waf'\n\n// Destroy the filesystem\nawait fs.destroy()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakryum%2Freactive-fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakryum%2Freactive-fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakryum%2Freactive-fs/lists"}