{"_id":"native-file-system-adapter","_rev":"11-cc5e04c8c8f5da39699136c6d8b60a6d","name":"native-file-system-adapter","dist-tags":{"latest":"3.0.1"},"versions":{"0.1.0":{"name":"native-file-system-adapter","version":"0.1.0","description":"Native File System API","main":"src/es6.js","directories":{"example":"example"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/jimmywarting/native-file-system-adapter.git"},"author":{"name":"Jimmy Wärting"},"license":"MIT","bugs":{"url":"https://github.com/jimmywarting/native-file-system-adapter/issues"},"homepage":"https://github.com/jimmywarting/native-file-system-adapter#readme","gitHead":"4b7ab42a7df7b392319460d4572f1c25771f4952","_id":"native-file-system-adapter@0.1.0","_nodeVersion":"14.2.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-HMJJnW6G50HSjdI8uJnTkd96TeWFzryvcmxGAnRxZ+m8cDCNlr+hHrpMH+NYXDcCjkvJzAF4JuL48dYvSEAqhA==","shasum":"70b1c1a4b39cb48fd46c6dd159cda4933a60ad92","tarball":"https://registry.npmjs.org/native-file-system-adapter/-/native-file-system-adapter-0.1.0.tgz","fileCount":83,"unpackedSize":186065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEYLvCRA9TVsSAnZWagAAoMQP/R0BrsxXtL9s8aP9k6JV\nq9uyOasafn2L5HIxnuNVQw0bVb6RO3k5PGfbhyRICwVvEiTf/hgkSy2svimP\nsiyJawyxcEFGhOCvCqfuRCZygqCtR3JuiwMlCxjUAcxuxdn3lRx7f9r/XQWK\nc2NwZOyllgrSGaPFMM3ryg0HcBIBhN+iX4bRIaXMAj4rBPlsmmfy/86Oo+me\nSxips3aDf0uwl+fvnyq+ha6Isqk6oi8Yn+e+tmjT8jnank+o0g22/G1vsST0\nopZP54Ex1e7vtr247rMhxdX1/0guwniA/2oVTu8MuxBlGIJDHnbhf3JwSHcP\nf0ipOkFapWMg5SAGIJtbcZOn9EmidA0x7lS3WHWb09fwZz+2NIstORi2ox85\nRkRId4QGdI31NY7XMvtFqqoWB2o48/Wj5NO0WgzagM1gy+IrRuFaDaIXDklL\nj/5c6WORgdOzC0Z2mpXmDOVYNvFvizxUKbf0mFT3Pvf2wj87QcHLbEAlwBIO\nw3XadD2sK1S4l50Gg6ELl7U3yDufY+xe0Ch79sKmryOIfW3ZcDSoiKe3Jii0\nG5jUm6RS148dpHbPjCyWjjx8okMciaNVpqh3iF+4QNWLK/sc8iHp24Lsx57T\nXf29JZ9fURNy4pItbu/PEREr3GV1Nq9oSAOMk9Zk7K/CXFja+d+Slg2GZAuE\nJxPZ\r\n=mhVY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCK9BoWWtAyUM0wvOjeQwO6rI1GIGbgsbtjJih6Aj3MXwIhAIHKAAUV2mUkpuekUv6fzgvy6uzgsrJMa8PZsok+BFTi"}]},"maintainers":[{"name":"endless","email":"jimmy@warting.se"}],"_npmUser":{"name":"endless","email":"jimmy@warting.se"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-file-system-adapter_0.1.0_1594983151228_0.65274232760802"},"_hasShrinkwrap":false},"1.0.0":{"name":"native-file-system-adapter","version":"1.0.0","description":"Native File System API","main":"src/es6.js","module":"./src/es6.js","directories":{"example":"example"},"type":"module","scripts":{"test":"exit 0","test:browser":"airtap --local test/browser.js","test:server":"node test/server-side.js","test:memory":"node test/memory.js","build":"rm -rf dist && rollup -c rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/jimmywarting/native-file-system-adapter.git"},"keywords":["filesystem","file","blob","stream","fs","read","write","delete","file system access","spec"],"author":{"name":"Jimmy Wärting"},"license":"MIT","bugs":{"url":"https://github.com/jimmywarting/native-file-system-adapter/issues"},"homepage":"https://github.com/jimmywarting/native-file-system-adapter#readme","optionalDependencies":{"web-streams-polyfill":"^2.1.1"},"dependencies":{"fetch-blob":"^3.0.0","node-domexception":"^1.0.0","web-streams-polyfill":"^2.1.1"},"devDependencies":{"@types/filesystem":"^0.0.30","rollup":"^2.51.1","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-terser":"^7.0.2","standardjs":"*","tape":"^5.2.2"},"funding":[{"type":"github","url":"https://github.com/sponsors/jimmywarting"},{"type":"paypal","url":"https://paypal.me/jimmywarting"}],"gitHead":"847b6c77d5896f99b5f48eea53f1dd775fa3571d","_id":"native-file-system-adapter@1.0.0","_nodeVersion":"16.1.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-Yz3gKSLmk2wqqSVQgZ2wcZnW7w1K722vsbJoZmYRtGc4KIzcUFjN9Ja4Xn9PsjQpVZM6CN0aX7qnUfy3WUuiHA==","shasum":"453d12e8c1a36b77d30349715e864d7f077a389a","tarball":"https://registry.npmjs.org/native-file-system-adapter/-/native-file-system-adapter-1.0.0.tgz","fileCount":31,"unpackedSize":123847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgw6IBCRA9TVsSAnZWagAABqsP/iBHr4HbS/iB1aVbyFnp\nKQ4YRBlGL54UzUQzS2ZTetPqTJa9n5cZQblpRl56up7RKloCGLvnFAiuicWe\nT5L6/Rh5gohRpPzMJpQedOA2BTTpJOuiaRJglFFvUrA1ZzFhUTAU3hrLS5eB\nBrINNYBl1uVIRCfIQwcLoEGzfPVF3jbNmX8aSvz3dd4g7FTXqcOzJTVC4m9N\nJwVXIP/E825P2qfhC6aXgYID8qOmnz8Pm4gEoBzDMmHDsDKkl0h3qaEHqbwi\nIuPK8j3LDd4BwdJdFzcvxjb/t4pKGWqyfaOcpyr5Pjj6qshB76Vckzlp8Tbd\nMUDaH9Rga7gvO88XqFVyn8BRm5d/1AiIrxukH291Q3LkNm2fb1pTJ37mh5Y8\nZrxT3Ykj5zj/m4iW7E06xg3fggSbpGozOHEEnyq8PiJ0b69iBIeJ68l/28K2\nl1Yqq0uI7aIofJGbYG8gGBkEF6WJ0qzfp9d5yd0fyt80CZ3ew5rc4JRXVgin\nV6ksLPupWQSSEhFkwHjv6LaLmqKW8vtlxLjHR330DJYUreeAzk5TIn5ElDgm\naRf0Ca2xr+4eLNnBibzT3mVTVF+I8LixR1ZQpp1fC5GHz/1ffNND9+uaYqnS\nfD5H9wVr/nxOy7qIS/pfxp0b0N+nLIvShLtAmbqroTskDNuN56hKG2NqYYrd\nADMl\r\n=zG1G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBNtNMpD+heIL+LkhZ74N4u28jRd5di5mOZJAiRZG4FQIgCEJOGqxbNAxwtXszZcnHAD98IF5A85LmGP0FT0BjdyE="}]},"_npmUser":{"name":"endless","email":"jimmy@warting.se"},"maintainers":[{"name":"endless","email":"jimmy@warting.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-file-system-adapter_1.0.0_1623433728936_0.5174260379252567"},"_hasShrinkwrap":false},"1.0.1":{"name":"native-file-system-adapter","version":"1.0.1","description":"Native File System API","main":"src/es6.js","module":"./src/es6.js","directories":{"example":"example"},"type":"module","scripts":{"test":"exit 0","test:browser":"airtap --local test/browser.js","test:server":"node test/server-side.js","test:memory":"node test/memory.js","build":"rm -rf dist && rollup -c rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/jimmywarting/native-file-system-adapter.git"},"keywords":["filesystem","file","blob","stream","fs","read","write","delete","file system access","spec"],"author":{"name":"Jimmy Wärting"},"license":"MIT","bugs":{"url":"https://github.com/jimmywarting/native-file-system-adapter/issues"},"homepage":"https://github.com/jimmywarting/native-file-system-adapter#readme","optionalDependencies":{"web-streams-polyfill":"^2.1.1"},"dependencies":{"fetch-blob":"^3.0.0","node-domexception":"^1.0.0","web-streams-polyfill":"^2.1.1"},"devDependencies":{"@types/filesystem":"^0.0.30","rollup":"^2.51.1","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-terser":"^7.0.2","standardjs":"*","tape":"^5.2.2"},"funding":[{"type":"github","url":"https://github.com/sponsors/jimmywarting"},{"type":"paypal","url":"https://paypal.me/jimmywarting"}],"gitHead":"cbd8dcdf1a96b496a74a4218cff02934c703c771","_id":"native-file-system-adapter@1.0.1","_nodeVersion":"16.1.0","_npmVersion":"7.11.2","dist":{"integrity":"sha512-EiM1hTGaYJKdk8FBWqHTwtOi7FgI7qcXrfWGo6C7Dv8fxY2FSCNFb9HAy07egTk0r0AnNRHGrqNmqfR5clHDDg==","shasum":"e19f60931b33aee00ff6cd062b0c1b9ecd9dd658","tarball":"https://registry.npmjs.org/native-file-system-adapter/-/native-file-system-adapter-1.0.1.tgz","fileCount":33,"unpackedSize":130513,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5e3xCRA9TVsSAnZWagAA09MP/2g/gjmHiIfLxiznntCf\nIO3cHkDXMdfPNNgXawhHRR9e/rI/l8HH0Bnb3UgyZytErqWrA+Yspm8qhAQz\nKdHV2SXDEPidHOk+XF62yBPVRjWgejmfE0urt2JXf9YB90gldqyKEZ5rnobA\nJa/ctO6zdnDlu2TjJ034Ux4mimZODJ6fXQFGAW8pt1f6efaxIP+Mxj/xirMd\nFEKMnCC5w6Mp0NRGCTP4q1+YwQzwLK+F6u0iGpU9Hxsfv5xDm0g7iUSLiLCs\nbV0NdKaGf0QKLXwgemIX73pYVflVPbK0G8LOErHZdm5xFOUA/SNxeTyk+Wi/\nF8deMYiNBCaaUyCYkku9Rh87FDUb/I0SENv9qg205BVTeWJDMVCdn6KYi+i3\nFLQHrfwRGF6Ms415p1dlSsX8UuraqgPzNO//umhgFKN4F7bZkh66t4fKL7Le\nHMU6HGI9nw7D2dhcdKIMGP0wokbCt8F3fjhA2afjA1ZUFcPyJ3zlD7vZ/izN\nEb2lha0BF4E6+hlXUuNNAD4CuHbiCpp9+06pA/orWkiUCkjzcVjGInMWKvNS\nL3RwMynYc88dCL5ShQvvkEzVM3LBTJjGgwSoX7zfXeXVYktG8lgv6vK8dpNx\nwxvaIVCyJL3dj8RioSB21BVX8U4BxLiwNHIEPV9rKbXttLD7xgWlGitGzDtY\n7KdN\r\n=XhHW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB2gYrtyL90R0tfI1IXyKFpYSe3UXnogdSoE2N0kaV2EAiBh/ZJt7nAdonojcAGMp7wSKX7QnurH4/0G3ijrU9mEvQ=="}]},"_npmUser":{"name":"endless","email":"jimmy@warting.se"},"maintainers":[{"name":"endless","email":"jimmy@warting.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-file-system-adapter_1.0.1_1625681392667_0.13669735262900917"},"_hasShrinkwrap":false},"1.1.0":{"name":"native-file-system-adapter","version":"1.1.0","description":"Native File System API","main":"src/es6.js","module":"./src/es6.js","directories":{"example":"example"},"type":"module","scripts":{"test":"exit 0","test:browser":"php -S localhost:4444 & open http://localhost:4444/example/test.html","test:node":"node test/test-node.js","test:deno":"deno run --allow-read test/test-deno.js","build":"rm -rf dist && rollup -c rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/jimmywarting/native-file-system-adapter.git"},"keywords":["filesystem","file","blob","stream","fs","read","write","delete","file system access","spec"],"author":{"name":"Jimmy Wärting"},"license":"MIT","bugs":{"url":"https://github.com/jimmywarting/native-file-system-adapter/issues"},"contributors":[{"name":"Alexandru Ciuca"}],"homepage":"https://github.com/jimmywarting/native-file-system-adapter#readme","optionalDependencies":{"web-streams-polyfill":"^3.1.1"},"dependencies":{"fetch-blob":"^3.0.0","node-domexception":"^1.0.0","web-streams-polyfill":"^3.1.1"},"devDependencies":{"@types/filesystem":"^0.0.30","rollup":"^2.51.1","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-terser":"^7.0.2","standard":"^16.0.3","tape":"^5.2.2"},"funding":[{"type":"github","url":"https://github.com/sponsors/jimmywarting"},{"type":"paypal","url":"https://paypal.me/jimmywarting"}],"gitHead":"2b3f98102d930a9af629ddbd58bbe3e1fe5f80fe","_id":"native-file-system-adapter@1.1.0","_nodeVersion":"16.6.2","_npmVersion":"7.20.3","dist":{"integrity":"sha512-+eHHmQPyC8e3DywcDuvhCEu+f8ik4BCLCEjo7IGL453XqdaDRoW3141kPFzcJhmBTUv6eiq/wrUjHcPH+sn4sQ==","shasum":"348a8eafd0bf2158dd7e92f9d1743cb85dc3cc7d","tarball":"https://registry.npmjs.org/native-file-system-adapter/-/native-file-system-adapter-1.1.0.tgz","fileCount":26,"unpackedSize":96099,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtYok78ItDDFkwAlVLwPCZJcBVsVFDO6PVtEPlZwlpKwIgdVC4W11si/RvyJHn3owR1hKSSbCiife6l7hPE0U3mag="}]},"_npmUser":{"name":"endless","email":"jimmy@warting.se"},"maintainers":[{"name":"endless","email":"jimmy@warting.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-file-system-adapter_1.1.0_1632403241001_0.6953119027222372"},"_hasShrinkwrap":false},"2.0.0":{"name":"native-file-system-adapter","version":"2.0.0","description":"Native File System API","main":"src/es6.js","module":"./src/es6.js","directories":{"example":"example"},"type":"module","scripts":{"test":"exit 0","test:browser":"php -S localhost:4444 & open http://localhost:4444/example/test.html","test:node":"node test/test-node.js","test:deno":"deno run --allow-read --allow-write --allow-net test/test-deno.js","build":"rm -rf dist && rollup -c rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/jimmywarting/native-file-system-adapter.git"},"keywords":["filesystem","file","blob","stream","fs","read","write","delete","file system access","spec"],"author":{"name":"Jimmy Wärting"},"license":"MIT","bugs":{"url":"https://github.com/jimmywarting/native-file-system-adapter/issues"},"contributors":[{"name":"Alexandru Ciuca"}],"homepage":"https://github.com/jimmywarting/native-file-system-adapter#readme","optionalDependencies":{"web-streams-polyfill":"^3.1.1"},"dependencies":{"fetch-blob":"^3.0.0","node-domexception":"^1.0.0","web-streams-polyfill":"^3.1.1"},"devDependencies":{"@types/filesystem":"^0.0.30","rollup":"^2.51.1","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-terser":"^7.0.2","standard":"^16.0.3","tape":"^5.2.2"},"standard":{"globals":["File","performance","Blob","Response","ClipboardEvent","DataTransferItem","FormData","alert","ReadableStream","DataTransfer"]},"funding":[{"type":"github","url":"https://github.com/sponsors/jimmywarting"},{"type":"paypal","url":"https://paypal.me/jimmywarting"}],"gitHead":"7d90f6f53dbc549c0d6469a8c0fa0061519ba975","_id":"native-file-system-adapter@2.0.0","_nodeVersion":"16.6.2","_npmVersion":"7.20.3","dist":{"integrity":"sha512-zvIxJS/ElcWfaS77CsSbVgQ6qxc9tuDaTckTXNKj1uTrf2LQu5kGp6JQxO0FDR+LeY/cZJTvh4+ozxXlT/GjAA==","shasum":"240aa6ff27725e12abe4e4a2d5fad9ac1d4fde5f","tarball":"https://registry.npmjs.org/native-file-system-adapter/-/native-file-system-adapter-2.0.0.tgz","fileCount":26,"unpackedSize":100198,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCv0mSywymOJ6NJxBQWxm3nat1Dt0TQOjd+TLLOIfZ/aQIhALCM+4cVS0fgGvkDk73sKxNnHUQpaRklrfvKL/rFrsHX"}]},"_npmUser":{"name":"endless","email":"jimmy@warting.se"},"maintainers":[{"name":"endless","email":"jimmy@warting.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-file-system-adapter_2.0.0_1633008847455_0.8687798680029135"},"_hasShrinkwrap":false},"2.0.1":{"name":"native-file-system-adapter","version":"2.0.1","description":"Native File System API","main":"src/es6.js","module":"./src/es6.js","directories":{"example":"example"},"type":"module","scripts":{"test":"exit 0","test:browser":"php -S localhost:4444 & open http://localhost:4444/example/test.html","test:node":"node test/test-node.js","test:deno":"deno run --allow-read --allow-write --allow-net test/test-deno.js","build":"rm -rf dist && rollup -c rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/jimmywarting/native-file-system-adapter.git"},"keywords":["filesystem","file","blob","stream","fs","read","write","delete","file system access","spec"],"author":{"name":"Jimmy Wärting"},"license":"MIT","bugs":{"url":"https://github.com/jimmywarting/native-file-system-adapter/issues"},"contributors":[{"name":"Alexandru Ciuca"}],"homepage":"https://github.com/jimmywarting/native-file-system-adapter#readme","optionalDependencies":{"web-streams-polyfill":"^3.1.1"},"dependencies":{"fetch-blob":"^3.0.0","node-domexception":"^1.0.0","web-streams-polyfill":"^3.1.1"},"devDependencies":{"@types/filesystem":"^0.0.30","rollup":"^2.51.1","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-terser":"^7.0.2","standard":"^16.0.3","tape":"^5.2.2"},"standard":{"globals":["File","performance","Blob","Response","ClipboardEvent","DataTransferItem","FormData","alert","ReadableStream","DataTransfer"]},"funding":[{"type":"github","url":"https://github.com/sponsors/jimmywarting"},{"type":"paypal","url":"https://paypal.me/jimmywarting"}],"gitHead":"de7d1d2e7b22488fd91c730a0e3f8754ad10933f","_id":"native-file-system-adapter@2.0.1","_nodeVersion":"16.6.2","_npmVersion":"7.20.3","dist":{"integrity":"sha512-6zftHY96+zOddS1BlXNpG6XLkOktzHND7gO+47vrFLySTCao+u3Ht+ceqHGQdULVTAMHP/DVtHMHhwrlRqPW3A==","shasum":"4ecaa2a0a2250c6a85f0d767ba78fa54b0f020e8","tarball":"https://registry.npmjs.org/native-file-system-adapter/-/native-file-system-adapter-2.0.1.tgz","fileCount":26,"unpackedSize":100619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh20LUCRA9TVsSAnZWagAAmloP/3b70lhX2FeZw23jdpwV\nTnrpBTTP3H7UzuMeNc+vy2t4fP0Kfk/3vZcl7Mf8kwOd5GSOZSZz1HTdY3pr\n8nW8M9CebF1hz5q54JjdWprC+AL+0gCKxkpjrlM64JXwHuUPhkJs2t/2TACH\n1ZsPVnYPuxrWBaO4PNOKPQXm5crBAGegI+Pu5Zv4wdigK+OMm6euvQcdXy29\nO7n1wVq+9oRr9gtLMMXFe1dD1ftEkzETIVMW5tXlapz2UHxsNPOuwzkmXuWP\n/TBt9SrdVh2BofQ8I2dLKFfvgyqDNXki16dYspxwYJ91xXp3p0cPfyMrnDv3\n++Be/bMRec1YRbIlLJeC+QqLXOXIbtPK1s+Ma3cmxK5GitnIMHz7rpuYxr0y\nNBPKuv4HsEuR/fA0ehjifp2pEoIcz95SiNQRCz4J7ZNNqhK7KN/OZP2tX9fy\nbp9uc1HMCysh5eN58vAr+yaNu9zGXT2QfgPMCqRpI+HWHiHj6sZO4Tt1hM8k\niJCS5R69I8hAxorZxtx5r2eh8DEBt6GWzaBelW5DdU1jhSAAkk1edLF6VWsH\nhArUoKLdh2TwWnYh8JMZh1p3JzPMk2ZzAHcsTw+6mOwk0IdyeaOeXFWS8vwV\nVooZz9fYbcGFNu8wRojU0p7S9N+AJ1xWbqXV1ktgJSfrB9PV83aC7A9O6GNq\nrLfd\r\n=UYlA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHdA9y/ZpKx+UN/oqsHNZtZSnUvoSwtRgiNiIfgdXgcuAiEAi7xi1jlLD6djHUl356csHenZ5bmxioyK07R6WDZiiMw="}]},"_npmUser":{"name":"endless","email":"jimmy@warting.se"},"maintainers":[{"name":"endless","email":"jimmy@warting.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-file-system-adapter_2.0.1_1633191249870_0.7082206253401182"},"_hasShrinkwrap":false},"2.0.3":{"name":"native-file-system-adapter","version":"2.0.3","description":"Native File System API","main":"src/es6.js","module":"./src/es6.js","directories":{"example":"example"},"type":"module","scripts":{"test":"exit 0","test:browser":"php -S localhost:4444 & open http://localhost:4444/example/test.html","test:node":"node test/test-node.js","test:deno":"deno run --allow-read --allow-write --allow-net test/test-deno.js","test:wpt-in-deno":"deno run --allow-read --allow-write --allow-net test/test-wpt-in-deno.js","build":"rm -rf dist && rollup -c rollup.config.js","_prepublishOnly":"rm -rf types && tsc -p jsconfig.json"},"repository":{"type":"git","url":"git+https://github.com/jimmywarting/native-file-system-adapter.git"},"engines":{"node":">=14.8.0"},"types":"types","keywords":["filesystem","file","blob","stream","fs","read","write","delete","file system access","spec"],"author":{"name":"Jimmy Wärting"},"license":"MIT","bugs":{"url":"https://github.com/jimmywarting/native-file-system-adapter/issues"},"contributors":[{"name":"Alexandru Ciuca"}],"homepage":"https://github.com/jimmywarting/native-file-system-adapter#readme","optionalDependencies":{"web-streams-polyfill":"^3.1.1"},"dependencies":{"fetch-blob":"^3.1.5","node-domexception":"^1.0.0","web-streams-polyfill":"^3.1.1"},"standard":{"globals":["File","performance","Blob","Response","ClipboardEvent","DataTransferItem","FormData","alert","ReadableStream","DataTransfer"]},"funding":[{"type":"github","url":"https://github.com/sponsors/jimmywarting"},{"type":"paypal","url":"https://paypal.me/jimmywarting"}],"devDependencies":{"@types/filesystem":"^0.0.32","rollup":"^2.67.3","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-terser":"^7.0.2","standard":"^16.0.4","tape":"^5.5.2","typescript":"^4.5.5"},"gitHead":"83c88362fc67ab475399dccf8c3e1b79cedb7cbb","_id":"native-file-system-adapter@2.0.3","_nodeVersion":"17.4.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-khhAuIKlX94V/7u8eMh2xAalB3FWeedXuVoBipGlbX8ye6UjV8To1yjzxH8VC9Bd/NIBKimqN9v+pZAwHCbfVw==","shasum":"ea8d8dffb649d84e2c390d5479d81c41d128d8a8","tarball":"https://registry.npmjs.org/native-file-system-adapter/-/native-file-system-adapter-2.0.3.tgz","fileCount":42,"unpackedSize":103425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMSDSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpakRAAiy1HJNWSsX+hKelQOtepzIqrRNXO/bdwBYWcCvwAQethZFcT\r\nkQO78yTEgnG1r5QNyFg/k5MsT5T/S4zsKnB+WoHiUe6CJw8WApLlsfS9OUaL\r\n8xjG/dZTZIa6KBStICaVgrvekF5siojl+HhcRISJZKxv44Wc8q/kKwxi4krZ\r\nYfcFDSi883R4RC35fbcd9MbRFy/RT96PouDkZ+V9I3tH5hTK0Sg383K3AFks\r\n97CU06xS5cKtdP86CMOtolLP/KXd9rK1oEdvSd1hmH5ImPWCoaK+I2kQPFt/\r\nODwMQk7IYHQCwjmO9JHKxQJvFzNrjKICbCEvsW/9/sJdUsClKEY56QLoTgKQ\r\ntdt7O8YO6EOoN3wLdc0PTctwZHoHqad7IaUa6K7bM5GNxtUYdQpcGuPW6WT0\r\nORvqfkDzRD0aa/5a0qrgKh4Nt9MiMiKdsIU9P+MX5CYi2VKOSFrhokS3aeT2\r\nywHfvzuthuSKu6l0putAeufkPf3ZegtydXIjPU68oiowg4YKtQ9nSp+LnBD/\r\nLiBgkMSTUKV4OJ0KY0JbzXpDULGXEgjjspzMXSzIIeoidVZNO7oDZCyy6z1M\r\nOKK2gf6qFTV7K+NZjb+6/5Wpr7iQvNpmGRwguOznvrT2VsqrfJ5neHk3E045\r\nVj/H1cnIvxiekOvQe8o6Flo8VaTM9VKcZ+k=\r\n=9xMu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF9VlGum76hXA8hwO1IEy3p7PlBJ7ttPhyof42BXD8OxAiEAqo89oJomP3uXLpujjv02Kh+UZ6LDMEZVUOKDBnEH9/8="}]},"_npmUser":{"name":"endless","email":"jimmy@warting.se"},"maintainers":[{"name":"endless","email":"jimmy@warting.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-file-system-adapter_2.0.3_1647386834105_0.5712950261810894"},"_hasShrinkwrap":false},"2.0.4":{"name":"native-file-system-adapter","version":"2.0.4","description":"Native File System API","main":"src/es6.js","module":"./src/es6.js","directories":{"example":"example"},"type":"module","scripts":{"test":"exit 0","test:browser":"php -S localhost:4444 & open http://localhost:4444/example/test.html","test:node":"node test/test-node.js","test:deno":"deno run --allow-read --allow-write --allow-net test/test-deno.js","test:wpt-in-deno":"deno run --allow-read --allow-write --allow-net test/test-wpt-in-deno.js","build":"rm -rf dist && rollup -c rollup.config.js","_prepublishOnly":"rm -rf types && tsc -p jsconfig.json"},"repository":{"type":"git","url":"git+https://github.com/jimmywarting/native-file-system-adapter.git"},"engines":{"node":">=14.8.0"},"types":"types","keywords":["filesystem","file","blob","stream","fs","read","write","delete","file system access","spec"],"author":{"name":"Jimmy Wärting"},"license":"MIT","bugs":{"url":"https://github.com/jimmywarting/native-file-system-adapter/issues"},"contributors":[{"name":"Alexandru Ciuca"}],"homepage":"https://github.com/jimmywarting/native-file-system-adapter#readme","optionalDependencies":{"web-streams-polyfill":"^3.1.1"},"dependencies":{"fetch-blob":"^3.1.5","node-domexception":"^1.0.0","web-streams-polyfill":"^3.1.1"},"standard":{"globals":["File","performance","Blob","Response","ClipboardEvent","DataTransferItem","FormData","alert","ReadableStream","DataTransfer"]},"funding":[{"type":"github","url":"https://github.com/sponsors/jimmywarting"},{"type":"paypal","url":"https://paypal.me/jimmywarting"}],"devDependencies":{"@types/filesystem":"^0.0.32","rollup":"^2.67.3","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-terser":"^7.0.2","standard":"^16.0.4","tape":"^5.5.2","typescript":"^4.5.5"},"gitHead":"0b730e285da989f005d42eae21a8608a21c71d63","_id":"native-file-system-adapter@2.0.4","_nodeVersion":"17.8.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-i8quiR5KVpwyuKT7Z91+c/DgDjyrEOb+eMsS+aBWxpmUChAK1vs8751gOxO0cNg2p5JGrqOazCF/8RZBgsYLXw==","shasum":"203ce556bcfa7593a4c407a25395e8717f784b28","tarball":"https://registry.npmjs.org/native-file-system-adapter/-/native-file-system-adapter-2.0.4.tgz","fileCount":43,"unpackedSize":106157,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7OGSg1GRkucfZX7rLj7hOIt3av3ClO4Alxuuli4oUbQIgVE4GEcF6DKM1wNdQ7JtRMTmgj7Ofa5L+ZHcPYWyQKec="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiR0M2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpM1g/+PEV1oeZWtt0KLu9uNeLkbMmCXG8+zT+FDvp+UYLH7AKLv4Tk\r\nAPszn26GJlZh9h04FVWnT/FVk8Zpiwq2xSKoxQwc6MIeDc8JEdBsl1N7NlAE\r\nz3LGjhsvOVW37VpqF7URJqjBPOJ510QSvoB8Vy1qShkcXvjyLAyQ2AGb2UZN\r\n02+sPdKmD1UNQEaVKPbeca6QcXNkA9ImNN8Q1yBPATL7EDQCobn8zG376grD\r\n2924YCiXZ0bgp5eK6LE7+7qRjfUSfets7I28tPgL7dNDzC5ts6al2UllyACT\r\nOtD4dxooTPCo1yx0YEECzpmzsnl7ozJZmAp4ggNYt+E+04+m3B0aeQ5Lx1kF\r\n0XZ4Cphv9yd5hFvYhqz/xl9KkPI1Du+02Ca4GM1GO1L6uWUDKibJdDqL4G8b\r\nEnWhFhYCNTq5oHUlAmIWD3rj778lSViNcFJSCZNDeGYSjlejrCGojW3whJuu\r\ny7+ReJ1wDGxiUIhk40GkKwmAsOsqxwL0GD5iH+sNg7WWKKItNXG7P2kj7j+k\r\npXVzpDKCscItsWZQeoTFryCdEqj+7Pz3XER8mAN48I/IMim8azg+5a4quJ9m\r\n6phKeJxu/7jL8fG/uLowZPTx0CDwocadxqRj62LkrAULJEvLy/vGfDP38DR0\r\nuZXUFfhyZplua9+DX8jIYNOZltKFJgSU60k=\r\n=LG3C\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"endless","email":"jimmy@warting.se"},"maintainers":[{"name":"endless","email":"jimmy@warting.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-file-system-adapter_2.0.4_1648837429701_0.05531354395835142"},"_hasShrinkwrap":false},"3.0.0":{"name":"native-file-system-adapter","version":"3.0.0","description":"Native File System API","main":"src/es6.js","module":"./src/es6.js","directories":{"example":"example"},"type":"module","scripts":{"test":"exit 0","test:browser":"php -S localhost:4444 & open http://localhost:4444/example/test.html","test:node":"node test/test-node.js","test:deno":"deno run --allow-read --allow-write --allow-net test/test-deno.js","test:wpt-in-deno":"deno run --allow-read --allow-write --allow-net test/test-wpt-in-deno.js","build":"rm -rf dist && rollup -c rollup.config.js","_prepublishOnly":"rm -rf types && tsc -p jsconfig.json"},"repository":{"type":"git","url":"git+https://github.com/jimmywarting/native-file-system-adapter.git"},"engines":{"node":">=14.8.0"},"types":"/types/mod.d.ts","keywords":["filesystem","file","blob","stream","fs","read","write","delete","file system access","spec"],"author":{"name":"Jimmy Wärting"},"license":"MIT","bugs":{"url":"https://github.com/jimmywarting/native-file-system-adapter/issues"},"contributors":[{"name":"Alexandru Ciuca"}],"homepage":"https://github.com/jimmywarting/native-file-system-adapter#readme","optionalDependencies":{"fetch-blob":"^3.2.0"},"standard":{"globals":["File","performance","Blob","Response","ClipboardEvent","DataTransferItem","FormData","alert","ReadableStream","DataTransfer"]},"funding":[{"type":"github","url":"https://github.com/sponsors/jimmywarting"},{"type":"paypal","url":"https://paypal.me/jimmywarting"}],"devDependencies":{"@types/filesystem":"^0.0.32","rollup":"^2.67.3","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-terser":"^7.0.2","standard":"^16.0.4","tape":"^5.5.2","typescript":"^4.5.5"},"gitHead":"70c0be67e6f224785b40135798470d382096e65c","dependencies":{"fetch-blob":"^3.2.0"},"_id":"native-file-system-adapter@3.0.0","_nodeVersion":"19.0.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-IXwQiLiS7UlrlUetr9rHp+6uAAHT3291w2FGse5rdrQ7YXKtZHaqC4+tEXHMXVcevwsJNB3c7q9KO1Iu3IxgLw==","shasum":"602317f30fdc2495efe598055a0cda75c1c6e051","tarball":"https://registry.npmjs.org/native-file-system-adapter/-/native-file-system-adapter-3.0.0.tgz","fileCount":44,"unpackedSize":106900,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG0q6NWXZILTfuOXi0zAxPqr4xRbb6BSRB+1NukNOs+gAiEAwAKk5BidwcBnhROQo1jPifambtCTGBePE3uzc0AN4TU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjf5lJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrPPQ/9FUCQIGwUTUGIRdB/7kDpnEi0Ak96deNQasQcCwwndMyTgKFf\r\nvungFL9Raqs5WjUDUYN/5z3TrA/mPy7Pwwl7Hbz5Fc/awdWNPMWOk1Qin9oV\r\nP8577/+b3OmiWueHtVd91UwNu8l6ReaFpOAt1uVwDq4rP1kCP8LXxeK4aBtx\r\nfxnDKN4yXxbJfvjCg9c8Yzw9pZAAPFp9yF85074jI5JAsA4ACprPgk0652jM\r\nSAHcRZ6Dapt/aSR3GAjHOMfCI90xfCIEtmwqihYHmgdJ6f75CxQh25HS8Gz9\r\nPMv2/b+rn9dknUOGekjjhYiRfVqK/3W9cSN4qLfw87HagyntROpKACXKzKww\r\ncKakZvY76rTzE32H4LmX/JDP6xqLxCxDCpfXSOOHnQ5lnxAtPVfOzz0SZtJz\r\nTM7eYlx297Y9t3OiFszbEGWMsCSG0HQW9UN1Wi/xdHvzY2cTIro/To9YJzr4\r\nsesrxAIMiuFYtQKGAjvJGS8gYD9wQb0tg0UOWubpoPrn5YgtsLO/DwAgXXbt\r\nEytpSNC2VljNdf4RhY4vBumUMkEveIRzcA4js7HKEHan3Y7y/8JMxYdoH2SA\r\nDljon3mNwb57tOjsZXpZpc4SGckhQv6+v1f10t+1ZtIZ+VC6GmlvK53CMbi1\r\nug7RRxgSeIomebUFotsVAsF+4KQFC6dMSgo=\r\n=uTRw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"endless","email":"jimmy@warting.se"},"maintainers":[{"name":"endless","email":"jimmy@warting.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-file-system-adapter_3.0.0_1669306696994_0.5705304120093699"},"_hasShrinkwrap":false},"3.0.1":{"name":"native-file-system-adapter","version":"3.0.1","description":"Native File System API","main":"src/es6.js","module":"./src/es6.js","directories":{"example":"example"},"type":"module","scripts":{"test":"exit 0","test:browser":"php -S localhost:4444 & open http://localhost:4444/example/test.html","test:node":"node test/test-node.js","test:deno":"deno run --allow-read --allow-write --allow-net test/test-deno.js","test:wpt-in-deno":"deno run --allow-read --allow-write --allow-net test/test-wpt-in-deno.js","build":"rm -rf dist && rollup -c rollup.config.js","_prepublishOnly":"rm -rf types && tsc -p jsconfig.json"},"repository":{"type":"git","url":"git+https://github.com/jimmywarting/native-file-system-adapter.git"},"engines":{"node":">=14.8.0"},"types":"types/mod.d.ts","keywords":["filesystem","file","blob","stream","fs","read","write","delete","file system access","spec"],"author":{"name":"Jimmy Wärting"},"license":"MIT","bugs":{"url":"https://github.com/jimmywarting/native-file-system-adapter/issues"},"contributors":[{"name":"Alexandru Ciuca"}],"homepage":"https://github.com/jimmywarting/native-file-system-adapter#readme","optionalDependencies":{"fetch-blob":"^3.2.0"},"standard":{"globals":["File","performance","Blob","Response","ClipboardEvent","DataTransferItem","FormData","alert","ReadableStream","DataTransfer"]},"funding":[{"type":"github","url":"https://github.com/sponsors/jimmywarting"},{"type":"paypal","url":"https://paypal.me/jimmywarting"}],"devDependencies":{"@types/filesystem":"^0.0.32","rollup":"^2.67.3","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-terser":"^7.0.2","standard":"^16.0.4","tape":"^5.5.2","typescript":"^4.5.5"},"_id":"native-file-system-adapter@3.0.1","gitHead":"333fd335fb887fd1c1d3e1272b30a99caf891f30","_nodeVersion":"21.5.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-ocuhsYk2SY0906LPc3QIMW+rCV3MdhqGiy7wV5Bf0e8/5TsMjDdyIwhNiVPiKxzTJLDrLT6h8BoV9ERfJscKhw==","shasum":"d8881903a94e17eac368c4c0e8805f98a4e2ddc1","tarball":"https://registry.npmjs.org/native-file-system-adapter/-/native-file-system-adapter-3.0.1.tgz","fileCount":45,"unpackedSize":117814,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZsZZtZsraWyf1vNAUbxxshhiem1MzMck124yvYBZV9wIhAL3GzaOnDp8BQ2ZNnbyCf812HtnWGqgU6cOlpH7J5Uo0"}]},"_npmUser":{"name":"endless","email":"jimmy@warting.se"},"maintainers":[{"name":"endless","email":"jimmy@warting.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-file-system-adapter_3.0.1_1708982167803_0.5912475918999585"},"_hasShrinkwrap":false}},"time":{"created":"2020-07-17T10:52:31.227Z","0.1.0":"2020-07-17T10:52:31.339Z","modified":"2024-02-26T21:16:08.435Z","1.0.0":"2021-06-11T17:48:49.887Z","1.0.1":"2021-07-07T18:09:52.800Z","1.1.0":"2021-09-23T13:20:41.156Z","2.0.0":"2021-09-30T13:34:07.831Z","2.0.1":"2021-10-02T16:14:10.052Z","2.0.3":"2022-03-15T23:27:14.324Z","2.0.4":"2022-04-01T18:23:50.131Z","3.0.0":"2022-11-24T16:18:17.145Z","3.0.1":"2024-02-26T21:16:08.014Z"},"maintainers":[{"name":"endless","email":"jimmy@warting.se"}],"description":"Native File System API","homepage":"https://github.com/jimmywarting/native-file-system-adapter#readme","repository":{"type":"git","url":"git+https://github.com/jimmywarting/native-file-system-adapter.git"},"author":{"name":"Jimmy Wärting"},"bugs":{"url":"https://github.com/jimmywarting/native-file-system-adapter/issues"},"license":"MIT","readme":"# Native File System adapter (ponyfill)\n\nWhat is this?\n\nThis is a file system API that follows the [File System Access](https://wicg.github.io/file-system-access/) specification. Thanks to it we can have a unified way of handling data in all browsers and even in NodeJS & Deno in a more secure way.\n\nAt a high level what we're providing is several bits:\n\n1. Ponyfills for `showDirectoryPicker`, `showOpenFilePicker` and `showSaveFilePicker`, with fallbacks to regular input elements.\n2. Ponyfills for `FileSystemFileHandle` and `FileSystemDirectoryHandle` interfaces.\n3. Ponyfill for `FileSystemWritableFileStream` to truncate and write data.\n4. An implementation of `navigator.storage.getDirectory()` (`getOriginPrivateDirectory`) which can read & write data to and from several sources called adapters, not just the browser sandboxed file system\n5. An polyfill for `DataTransferItem.prototype.getAsFileSystemHandle()`\n\n## File system adapters\n\nWhen `getOriginPrivateDirectory` is called with no arguments, the browser's native sandboxed file system is used, just like calling `navigator.storage.getDirectory()`.\n\nOptionally, a file system backend adapter can be provided as an argument. This ponyfill ships with a few backends built in:\n\n* `node`: Uses NodeJS's `fs` module\n* `deno`: Interact with filesystem using Deno\n* `sandbox` (deprecated): Uses [requestFileSystem](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestFileSystem). Only supported in Chromium-based browsers using the `Blink` engine.\n* `indexeddb`: Stores files into the browser's `IndexedDB` object database.\n* `memory`: Stores files in-memory. Thus, it is a temporary file store that clears when the user navigates away.\n* `cache`: Stores files with the browser's [Cache API](https://web.dev/cache-api-quick-guide/) in request/response pairs.\n\nYou can even load in your own underlying adapter and get the same set of API's\n\nThe API is designed in such a way that it can work with or without the ponyfill if you choose to remove or add this.<br>\nIt's not trying to interfere with the changing spec by using other properties that may conflict with the feature changes to the spec.\n\n( The current minium supported browser I have chosen to support is the ones that can handle import/export )<br>\n( Some parts are lazy loaded when needed )\n\n### Updating from 2.x to 3.x\nv3 removed all top level await that conditionally loaded polyfills like\nWritableStream, DOMException, and Blob/File. considering that now all latest\nup to date env have this built in globally on `globalThis` namespace. This makes\nthe file system adapter lighter for ppl who want a smaller bundle and supports\nnewer engines.\n\nBut if you still need to provide polyfills for older environments\nthen you can provide your own polyfill and set it up with our config before any\nother script is evaluated\n\n```js\n\nimport config from 'native-file-system-adapter/config.js'\n// This is the default config that you could override as needed.\nObject.assign(config, {\n  ReadableStream: globalThis.ReadableStream,\n  WritableStream: globalThis.WritableStream,\n  TransformStream: globalThis.TransformStream,\n  DOMException: globalThis.DOMException,\n  Blob: globalThis.Blob,\n  File: globalThis.File\n})\n// continue like normal.\nimport xyz from 'native-file-system-adapter'\n```\n\n\n\n### ES import in browser\n\n```html\n<script type=\"module\">\n  import { getOriginPrivateDirectory } from 'https://cdn.jsdelivr.net/npm/native-file-system-adapter/mod.js'\n  // Get a directory handle for a sandboxed virtual file system\n  // same as calling navigator.storage.getDirectory()\n  const dirHandle1 = await getOriginPrivateDirectory()\n  // or use an adapter (see adapters table above for a list of available adapters)\n  const dirHandle2 = await getOriginPrivateDirectory(import('https://cdn.jsdelivr.net/npm/native-file-system-adapter/src/adapters/<adapterName>.js'))\n</script>\n```\n\n```\nnpm i native-file-system-adapter\n```\n\n```js\nimport { getOriginPrivateDirectory } from 'native-file-system-adapter'\nimport indexedDbAdapter from 'native-file-system-adapter/lib/adapters/indexeddb.js'\nimport nodeAdapter from 'native-file-system-adapter/lib/adapters/node.js'\nconst dirHandle = await getOriginPrivateDirectory(indexedDbAdapter)\nconst nodeDirHandle = await getOriginPrivateDirectory(nodeAdapter, './real-dir')\n```\n\n## Examples\n\n### File system sandbox\n\nYou can get a directory handle to a sandboxed virtual file system using the `getOriginPrivateDirectory` function.\nThis is a legacy name introduced by an older `Native File System` specification and is kept for simplicity.\nIt is equivalent to the `navigator.storage.getDirectory()` method introduced by the later [File System Access](https://wicg.github.io/file-system-access/) spec.\n\n```js\nimport { getOriginPrivateDirectory, support } from 'native-file-system-adapter'\n// Uses native implementation - same as calling navigator.storage.getDirectory()\nawait getOriginPrivateDirectory().catch(err => {\n  // native implementation not supported fallback to any of the adapters\n\n  // Blinks old sandboxed api\n  handle = await getOriginPrivateDirectory(import('native-file-system-adapter/lib/adapters/sandbox.js'))\n  // fast in-memory file system\n  handle = await getOriginPrivateDirectory(import('native-file-system-adapter/lib/adapters/memory.js'))\n  // Using indexDB\n  handle = await getOriginPrivateDirectory(import('native-file-system-adapter/lib/adapters/indexeddb.js'))\n  // Store things in the new Cache API as request/responses (bad at mutating data)\n  handle = await getOriginPrivateDirectory(import('native-file-system-adapter/lib/adapters/cache.js'))\n\n  // Node only variant:\n  handle = await getOriginPrivateDirectory(import('native-file-system-adapter/lib/adapters/memory.js'))\n  handle = await getOriginPrivateDirectory(import('native-file-system-adapter/lib/adapters/node.js'), './starting-path')\n\n  // Deno only variant:\n  handle = await getOriginPrivateDirectory(import('native-file-system-adapter/src/adapters/memory.js'))\n  handle = await getOriginPrivateDirectory(import('native-file-system-adapter/src/adapters/deno.js'), './starting-path')\n})\n```\n\n### File and directory pickers\n\n```js\nimport { showDirectoryPicker, showOpenFilePicker } from 'native-file-system-adapter'\n// The polyfilled (file input) version will turn into a memory adapter\n// You will have read & write permission on the memory adapter,\n// you might want to transfer (copy) the handle to another adapter\nconst [fileHandle] = await showOpenFilePicker({_preferPolyfill: boolean, ...sameOpts})\nconst dirHandle = await showDirectoryPicker({_preferPolyfill: boolean, ...sameOpts})\n```\n\n### Drag and drop\n\n```js\n// DataTransferItem.prototype.getAsFileSystemHandle() is conditionally polyfilled\nimport 'native-file-system-adapter'\nwindow.ondrop = async evt => {\n  evt.preventDefault()\n  for (let item of evt.dataTransfer.items) {\n    const handle = await item.getAsFileSystemHandle()\n    console.log(handle)\n  }\n}\n```\n\n### Copy file handles to sandboxed file system\n\n```js\nimport { showOpenFilePicker, getOriginPrivateDirectory } from 'native-file-system-adapter'\n\n// request user to select a file\nconst [fileHandle] = await showOpenFilePicker({\n  types: [], // default\n  multiple: false, // default\n  excludeAcceptAllOption: false, // default\n  _preferPolyfill: false // default\n})\n\n// returns a File Instance\nconst file = await fileHandle.getFile()\n\n// copy the file over to a another place\nconst rootHandle = await getOriginPrivateDirectory()\nconst fileHandle = await rootHandle.getFileHandle(file.name, { create: true })\nconst writable = await fileHandle.createWritable()\nawait writable.write(file)\nawait writable.close()\n```\n\n### Save / download a file\n\n```js\nimport { showSaveFilePicker } from 'native-file-system-adapter'\n\nconst fileHandle = await showSaveFilePicker({\n  _preferPolyfill: false,\n  suggestedName: 'Untitled.png',\n  types: [\n    { accept: { \"image/png\": [ \"png\" ] } },\n    { accept: { \"image/jpg\": [ \"jpg\" ] } },\n    { accept: { \"image/webp\": [ \"webp\" ] } }\n  ],\n  excludeAcceptAllOption: false // default\n})\n\n// Look at what extension they chosen\nconst extensionChosen = fileHandle.name.split('.').pop()\n\nconst blob = {\n  jpg: generateCanvasBlob({ type: 'blob', format: 'jpg' }),\n  png: generateCanvasBlob({ type: 'blob', format: 'png' }),\n  webp: generateCanvasBlob({ type: 'blob', format: 'webp' })\n}[extensionChosen]\n\nawait blob.stream().pipeTo(fileHandle.createWritable())\n// or\nconst writer = await fileHandle.createWritable()\nawait writer.write(blob)\nawait writer.close()\n```\n\n## Supported browsers\n\nWhen importing as an ES module, browsers that support [dynamic imports](https://caniuse.com/es6-module-dynamic-import) and ES2018 features are a minimum requirement. When using a bundler, this restriction is no longer applicable.\n\nWhen the directory picker falls back to `input` elements, the browser must support [webkitdirectory](https://caniuse.com/mdn-api_htmlinputelement_webkitdirectory) and [webkitRelativePath](https://caniuse.com/mdn-api_file_webkitrelativepath). Because of this, support for picking directories is generally poor on Mobile browsers.\n\nFor drag and drop, the `getAsFileSystemHandle()` polyfill depends on the `File and Directory Entries API` support, more specifically [FileSystemDirectoryEntry](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry), [FileSystemFileEntry](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileEntry) and [webkitGetAsEntry](https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem/webkitGetAsEntry).\n\n\n## Limitations\n\n- Storing a file handle in IndexedDB or sharing it with postMessage isn't currently possible unless you use native.\n- `showDirectoryPicker` and `showOpenFilePicker` will not throw any `AbortError`s (e.g. user cancellations) when using a fallback input element\n- `showSaveFilePicker` may not actually show any prompt when using a fallback with `<a download>`\n- Cache adapter only works in secure (HTTPS) contexts `window.isSecureContext === true`\n- IndexedDB adapter may not work in some browsers in Private mode\n\n## A note when downloading with the polyfilled version\n\nSaving/downloading a file is borrowing some of ideas from [StreamSaver.js](https://github.com/jimmywarting/StreamSaver.js).\nThe difference is:\n - Using service worker is optional choice with this adapter.\n - It does not rely on some man-in-the-middle or external hosted service worker.\n - If you want to stream large data to the disk directly instead of taking up much RAM you need to set up a service worker yourself.<br>(note that it requires https - but again worker is optional)\n\nto set up a service worker you have to basically copy [the example](https://github.com/jimmywarting/native-file-system-adapter/tree/master/example/sw.js) and register it:\n\n```js\nnavigator.serviceWorker.register('sw.js')\n```\n\nWithout service worker you are going to write all data to the memory and download it once it closes.\n\nSeeking and truncating won't do anything. You should be writing all data in sequential order when using the polyfilled version.\n\n## Testing\n\n- For browser tests: In project folder, run `php -S localhost:3000` or `npx http-server -p 3000 .`\n  - open `http://localhost:3000/example/test.html` in your browser.\n- For node: `npm run test-node`\n- For deno: `npm run test-deno`\n\n## Resources\n\nI recommend to follow up on this links for you to learn more about the API and how it works\n\n- https://web.dev/file-system-access\n- https://wicg.github.io/file-system-access\n- https://github.com/WICG/file-system-access\n\n## Alternatives\n- [browser-fs-access](https://github.com/GoogleChromeLabs/browser-fs-access) by [@tomayac](https://github.com/tomayac): A similar, more like a shim (without `getSystemDirectory`).\n- [StreamSaver](https://github.com/jimmywarting/StreamSaver.js) by [@jimmywarting](https://github.com/jimmywarting): A way to save large data to the disk directly with a writable stream <br><small>(same technique can be achieved if service worker are setup properly)</small>\n- [FileSaver](https://github.com/eligrey/FileSaver.js) by [@eligrey](https://github.com/eligrey): One among the first libs to save blobs to the disk\n\n## License\n\nnative-file-system-adapter is licensed under the MIT License. See `LICENSE` for details.\n","readmeFilename":"README.md","keywords":["filesystem","file","blob","stream","fs","read","write","delete","file system access","spec"],"contributors":[{"name":"Alexandru Ciuca"}]}