{"id":15383510,"url":"https://github.com/ebidel/idb.filesystem.js","last_synced_at":"2025-04-04T08:03:41.898Z","repository":{"id":2729569,"uuid":"3724762","full_name":"ebidel/idb.filesystem.js","owner":"ebidel","description":"HTML5 Filesystem API polyfill using IndexedDB","archived":false,"fork":false,"pushed_at":"2020-10-25T01:43:21.000Z","size":5871,"stargazers_count":491,"open_issues_count":16,"forks_count":47,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-03-28T07:02:33.301Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/idb.filesystem.js","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"chentsulin/awesome-graphql","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ebidel.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2012-03-15T03:04:57.000Z","updated_at":"2025-03-28T03:04:04.000Z","dependencies_parsed_at":"2022-09-06T14:50:25.634Z","dependency_job_id":null,"html_url":"https://github.com/ebidel/idb.filesystem.js","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebidel%2Fidb.filesystem.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebidel%2Fidb.filesystem.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebidel%2Fidb.filesystem.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebidel%2Fidb.filesystem.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ebidel","download_url":"https://codeload.github.com/ebidel/idb.filesystem.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247137251,"owners_count":20889834,"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-01T14:38:22.982Z","updated_at":"2025-04-04T08:03:41.872Z","avatar_url":"https://github.com/ebidel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"idb.filesystem.js\n===========\n\nidb.filesystem.js is a [well tested](//github.com/ebidel/idb.filesystem.js/tree/master/tests) JavaScript polyfill implementation\nof the HTML5 [Filesystem API][1]. It is intended for browsers that do not\nsupport the API natively.\n\nThe library works by using [IndexedDB][2] as its underlying storage layer. Essentially,\nthis means that any browser supporting IndexedDB also supports the Filesystem API!\nAll you need to do is make Filesystem API calls, and the rest is magic.\n\nSupported Browsers\n------------------\n\n* Firefox 11+\n* Safari 7.1+\n* iOS 8+\n* Opera 15+\n* IE 10+\n\nUnlisted browsers and/or versions (e.g. earlier versions of Firefox) that\nsupport IndexedDB will likely work; I just haven't tested them.\n\n[1]: http://dev.w3.org/2009/dap/file-system/pub/FileSystem/\n[2]: https://developer.mozilla.org/en/IndexedDB\n\nDemo\n===============\n\nTwo demo apps are included under [/demos](//github.com/ebidel/idb.filesystem.js/tree/master/demos). The\n[basic demo](http://html5-demos.appspot.com/static/filesystem/idb.filesystem.js/demos/basic/index.html)\nallows you add files to the app by drag and drop from the desktop. The second demo \nis a slightly modified version of filer.js's [playground app](http://html5-demos.appspot.com/static/filesystem/idb.filesystem.js/demos/playground/index.html). What's exciting is that the same app now works in other browsers besides Chrome!\n\n\u003ca href=\"http://html5-demos.appspot.com/static/filesystem/idb.filesystem.js/demos/basic/index.html\"\u003e\n  \u003cimg src=\"https://raw.github.com/ebidel/idb.filesystem.js/master/demos/playground/images/demo_screenshot.png\" title=\"Demo app screenshot\" alt=\"Demo app screenshot\"\u003e\n\u003c/a\u003e\n\nGetting started\n===============\n\nInstall the polyfill:\n\n    npm install idb.filesystem.js --save\n\nDrop it on your page:\n\n    \u003cscript src=\"node_modules/idb.filesystem.js/dist/idb.filesystem.min.js\" async\u003e\u003c/script\u003e\n\nThen use the Filesystem API as normal! **See my [HTML5Rocks article](http://www.html5rocks.com/tutorials/file/filesystem/) on using the Filesystem API.**\n\nBasic example of opening a filesystem and writing to a new .txt file:\n\n    window.requestFileSystem(TEMPORARY, 1024 * 1024, function(fs) {\n      console.log('Opened ' + fs.name);\n      \n      fs.root.getFile('NewFile.txt', {create: true}, function(fileEntry) {\n        fileEntry.createWriter(function(fileWriter) {\n          fileWriter.onwritestart = function() {\n            console.log('WRITE START');\n          };\n          \n          fileWriter.onwriteend = function() {\n            console.log('WRITE END');\n          };\n\n          var blob = new Blob(['1234567890'], {type: 'text/plain'});\n        \n          fileWriter.write(blob);\n        }, onError);\n      }, onError);\n    }, onError);\n\n    function onError(e) {\n      console.log('Error', e);\n    }\n\nUsing with filer.js\n------------------\n\n[filer.js](//github.com/ebidel/filer.js) is a convenience library for the\nHTML5 Filesystem API. It wraps API calls with familiar UNIX commands\n(`cp`, `mv`, `ls`) for its own API.\n\nfiler.js works well with idb.filesystem.js, with a few exceptions. Unimplemented\nmethods in this library and `filer.open()` (because `filesystem:` URLs are not\nknown by unsupported browsers). There may be other API calls in filer.js that\ndo not work, but I haven't tested them.\n\n## Contributing\n\n### Building\n\nInstall the dependencies and compile the library by running `gulp`:\n\n    npm install\n    gulp\n\nThis will output a built file to `dist/idb.filesystem.min.js`.\n\n### Releasing\n\nTo cut a new release, run:\n\n    npm version patch\n    gulp\n    npm publish\n\n[![Analytics](https://ga-beacon.appspot.com/UA-46812528-1/ebidel/idb.filesystem.js/README)](https://github.com/igrigorik/ga-beacon)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febidel%2Fidb.filesystem.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febidel%2Fidb.filesystem.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febidel%2Fidb.filesystem.js/lists"}