{"_id":"universal-file","_rev":"10-4d301ecd87990ad93971e148e19efa5c","name":"universal-file","dist-tags":{"beta":"2.0.0-beta","latest":"1.1.2"},"versions":{"1.0.0-beta.1":{"name":"universal-file","author":{"name":"rax"},"version":"1.0.0-beta.1","description":"File operations.","main":"lib/index.js","scripts":{"start":"rax-scripts start","build":"rax-scripts build"},"pre-commit":["lint"],"keywords":["Rax"],"engines":{"npm":">=3.0.0"},"dependencies":{"universal-env":"^2.0.0"},"devDependencies":{"rax":"^1.0.8","rax-plugin-api":"^0.2.0","rax-scripts":"^2.0.0"},"_id":"universal-file@1.0.0-beta.1","_nodeVersion":"9.11.1","_npmVersion":"6.10.1","dist":{"integrity":"sha512-v9zWiy9UPspZxgDzxHLZfjM9r+5KgLFeT3J1ObGszKdQl3ZrU2DUaatZ9tYDZD9Ab49YdUsUm2CzEMEIW+Ttfg==","shasum":"33e7486d1e3c11572e273db8b7dfe83116be2cf5","tarball":"https://registry.npmjs.org/universal-file/-/universal-file-1.0.0-beta.1.tgz","fileCount":68,"unpackedSize":38803,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1oCHCRA9TVsSAnZWagAA2zEP/2E1LcS6q+23i5cuoln9\nnitztlNnv+fo0TB3z7tXNWCyRZInZ7Uh8MrnLLyd5vrISmDDJOQPv+6oiO4/\nugszsYcsPNbSun98It4ObC4+6Q3Jx7n6hd6VdxZTxM93iJ8BMQPb55d2zLfD\nzVoP3xSKSDv8FVfEdKVvYHpErH0rhlTZMCcGdC8V1tyK3h+/o6Ulg17Fmeo7\n5OQ7sT5iux4Ql/63fJqzttQ8MPvkxIiVJuu+NSFMVaEvf1DVsCCL+9dDJg7A\nuHOBs1wqSJUbJ3vqIs74cUTJEaK/4XIQK7F4R9FL5ObWYVVMPLcWPhxqIiYs\n64CaSdVT0u8Wp92N3/1a/TTRGu+/5H75vsnh+JWWKyJqrN9AH5xXTr/kT3Xg\nbZOZfiCV1iR5a2ynmRm/05BVF1bRKt+6A8g7UT70N0toOgQw8jsBGaPdouPn\nnQx+uqdtqPNT/jjvHkp/PSBA/i2vube85MpylsKc3BpdgsH86wdXszDXMolS\n1dtNld9/5QcSWzzHdmdkTvzsHuK18Xb475RahjRy5VbBVP58c6CmPnev8y3I\nKiN+hOp5CXiuOkbJ0sqqTZgr+l5ca8pupoHN9v5+Hu7r8Apr6EgnsQz0M7pQ\nWvfkwtZ4SGOPJ2xpwMmTDSXB1UlHHYtZUXk7LRaMPRDfPFirXOsDCODeTUEW\ntghy\r\n=LUWV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEkvpBBXHHLBwQYKUeS/70U+Med6vMPAw18IEwzAh0xaAiB6HmkS+L2umrQ/lzG9zj3QUX3Bn+QcmbB4WicMIt56gA=="}]},"maintainers":[{"name":"balloonzzq","email":"zqzhuang888@qq.com"}],"_npmUser":{"name":"balloonzzq","email":"zqzhuang888@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/universal-file_1.0.0-beta.1_1574338694894_0.5871870226385587"},"_hasShrinkwrap":false},"1.0.0":{"name":"universal-file","author":{"name":"rax"},"version":"1.0.0","description":"File operations.","main":"lib/index.js","scripts":{"start":"rax-scripts start","build":"rax-scripts build"},"pre-commit":["lint"],"keywords":["Rax"],"engines":{"npm":">=3.0.0"},"dependencies":{"universal-env":"^2.0.0"},"devDependencies":{"rax":"^1.0.8","rax-plugin-api":"^0.2.0","rax-scripts":"^2.0.0"},"_id":"universal-file@1.0.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-QA6+eMUy6IN4fvKM2py+jV5z25I576i2vHQxWKgCtXZsNfhEOxh80otEW3ddmJvF+5jlRlWmZhxPinNJ5wmF5g==","shasum":"2f8b741d3830cc6f0b0baba2c24907b8a546c56e","tarball":"https://registry.npmjs.org/universal-file/-/universal-file-1.0.0.tgz","fileCount":68,"unpackedSize":38325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9yF/CRA9TVsSAnZWagAAHjIP/jbsywPCbOJ1gyH+n48g\ndprx+aXsW3YZlK8uJw1Eq9EyY/mJLZ9VcjdFQNbBuKA6c2mAiGK8ApCloRn0\nc+dFaCpCNNPFA3PvtH8J4l/sabgq0ynesxx1G6i3uUeNnNokutBASN75Ocub\nCPYzLY/kOA4/pcYqikIz4n/z2OSAvgitmavtx/THPocKyjhlzqevlgAbYwU+\n//EEpFFQWyL2iqm3Ca0q3NS3yEq1fXsAUzGbsOtHkiAZbBXkQsN6Q25ghbRF\nvhldNoPtbsIVzvUwYg9/E0v0Tc9f8uwC6ybHMTUYWOyRcdi9LIqTTJmC/HfV\nCZjdneUM3t8tGg3rYbdcF8WH6K9CEW9wkLHutT+H+IyLLsu/DIgzNEIUlMxG\nfWoES5jXfi29m7pxH7Vok15uYiwzN8eHJttHArGaGC8o6U59egIWnzJI+Hvh\nBtbxGuqdYlOFHosOiBS5GLX7reDzZEJbKL4QbRCQW62RKbl7H5A7oVWu92Ed\n11H0F7RTF3QsN4KUKJVeZdBZMSl18/vd2fv+kqWrl3oSbzsB9IjbRBZWSq7k\nO5ypUU6rAGOAZFbKoT9hbIs9zL4SM8FAvfym+2PRFqirCIWuYsZjFSgHpqdn\nMKsGQJB35Z+j+s4aiGpoUlskgCfB2kR6qDLLkz4G7UDe+hDDJLj1MTYomes/\nN2eD\r\n=rS6F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5NVPdk0ZXgMDlBc+AA2MN/HBtzRlAKmt4ZUCreVciCwIhAOSdWRAt7OSG5fXS3wbFLT7S+UdcsSARkGPlHeVbK3kR"}]},"maintainers":[{"email":"rax-publisher@zeroling.com","name":"rax-publisher"}],"_npmUser":{"name":"rax-publisher","email":"rax-publisher@zeroling.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/universal-file_1.0.0_1576477055061_0.7041408308739427"},"_hasShrinkwrap":false},"1.1.0":{"name":"universal-file","author":{"name":"rax"},"version":"1.1.0","description":"File operations.","main":"lib/index.js","scripts":{"start":"rax-scripts start","build":"rax-scripts build"},"pre-commit":["lint"],"keywords":["Rax"],"engines":{"npm":">=3.0.0"},"dependencies":{"universal-env":"^2.0.0"},"devDependencies":{"rax":"^1.0.8","rax-plugin-api":"^0.2.0","rax-scripts":"^2.0.0"},"_id":"universal-file@1.1.0","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Kgd+AJcBDgUX2ScluFSGkr1kbn0fI9gpXDkDWmNQp8ix/5YsinsKUjIb19hvGua6CUOsyJSk+RCEdu23KJ8hrw==","shasum":"66b8abf8fe38c108a8cc7e65f805fc708ba71855","tarball":"https://registry.npmjs.org/universal-file/-/universal-file-1.1.0.tgz","fileCount":74,"unpackedSize":50626,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezK5yCRA9TVsSAnZWagAAEFsP/1z3y8hcCcvFg3Q/XTGv\nltMwsvlCFPzDrfGbxa9IloqdAh/BJ5tl4oHZgqQwbmSPAocZPG1Ye403Oy2J\nfGunb2pu3R7ZIdJrJOewwdufgKuKJ1zxatAA6fbaKmFWPlB0DgIasmBz2GAt\nY2mOfnDRRdPRL2cAKQ1EV1nJrPjdjrDTkcpcvzJlgJcNaFYSae2MAxfs8HpK\nDYctcBr89uQ89kLG9OTNZeqPqhSbx//5448Os2x61VDX8cZy7O5Un4afbEge\nnhMcwXF04guj80N5E7NFZSVlpaedBLh18tMcJyOTHjV5NgY3XcJAORPXDIVj\nS0FyO+uS7YIV+eA6bh826Q+SRQ7GGp6GvdlQ5JPEy+6KNE51sUCR41SiYdZu\n7CZALsAHFdKhm56LpLQ8jynoGJgeD8aByQEk2hauR1C3JNjEWfqrFNCVx/xO\nR2GmB7KbIvkVjODJmQU61zrhXZLVJwRsR+lT83P8fPSv/zQNrxKeHVL1BQ80\n/NPK4ExGBrriOx5gnLGKs289FZ8AkJoXaZLjodO0tsjY9NpzRgAfSujWJXSb\nekRKKacJsakeFvy9vJORgKUPogIdLZYUq5TsMxHsjgQw87VOIABeviY6BRkx\ns/JT+MKyufTfHxk72f9946++2hg/hIO6Ej2ZyG1FRi6lBlDbIUk/micSk5Ay\n0vwp\r\n=ecFI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDA1u85wM1JVjmuuLK0KW2MNbeT1HPC9n+QzyTV95kVJwIhAJNJ+Y/umGCYnRJ6ZJCEaoKNPUnOp6hu9D7NhHPTJXYP"}]},"maintainers":[{"email":"rax-publisher@zeroling.com","name":"rax-publisher"}],"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/universal-file_1.1.0_1590472305481_0.44818091623697964"},"_hasShrinkwrap":false},"1.1.1":{"name":"universal-file","author":{"name":"rax"},"version":"1.1.1","description":"File operations.","main":"lib/index.js","scripts":{"start":"rax-scripts start","build":"rax-scripts build"},"pre-commit":["lint"],"keywords":["Rax"],"engines":{"npm":">=3.0.0"},"dependencies":{"universal-env":"^2.0.0"},"devDependencies":{"rax":"^1.0.8","rax-plugin-api":"^0.2.0","rax-scripts":"^2.0.0"},"_id":"universal-file@1.1.1","_nodeVersion":"10.21.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-v+tANlsgWx2/1+wqLy5ZcW2j31J5Crr5BlOYTP6JrUzkxssr8nlOpxOkOz9yIEd8X1yg92arKMsxlZR7VD2V9Q==","shasum":"5f09539aad837034b29535a6caa1ec8644175439","tarball":"https://registry.npmjs.org/universal-file/-/universal-file-1.1.1.tgz","fileCount":74,"unpackedSize":50632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH9PQCRA9TVsSAnZWagAAI2MQAIGtqHsupym2eQG8Cd1k\nDwKxSjSou9SOj3g/Vkuo97bxZX2E7451hDkNuZLUWi7J8A9BijSPIzzjuqvj\n3ajASCMEFFzm2DDmDL0Uoyd+NILsi7kjY4WNFQjS9DkP28uPI9DUowS1ZVt7\nmOv6dSP/hKz69P+tG9mvTt28dudhX6CH5g9MCjrXmsCL6uRkVLXIgqFjXM8z\nYGPERJNOK0OmSRQ9whJizreae05NZ5tzSXVUr1osuYCgleubS8MEh+3W4NIi\n4TI4NZiQhjNTlm/7puCl0TomEudfRXgWgG12uRa741/xxf8iQKmzihahhR2b\n2BW2NGQU7YLIqlk+RDlzrQuIhb1AUwisagvHDGSs+IBDavEexYUfAsk3FY+V\nxhR0VV/FLFPa4ERx/jznFGdGekNUESiTsplN2TSp0bmoxGBafv+oNnXpwF9g\nAdhe4yFdmCEfBPIVpRWGTiFy9IZTObvMO+FU1iQXwDozFQs7Ah5midv5LrCV\nO6wGQEyvCko+ObdmAxzUhcnrhlGgmw6giH26DvlwfjF1b+Q8rI/EKYCaDTqG\nHNbGEbn4S5w5N1y9W6JLje74zamBY7+Jg5DWCU5x66icCwKSpqAYk7OlWuQf\nVpKdk7Qz2/UbRGdkUu3cUup/NpITwOQY8YQAx3P9fTpVIkG9uNjxiiqwbJOI\nIefG\r\n=fhHV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5vAxk5n3cX4btMEzaamhAerr0bIcVLnOlDZaJ1BIL7gIhAJ4MhOryKPfUHIZMlGQfitgZ/PYYBB6RBD6gUcoz8tyD"}]},"maintainers":[{"email":"rax-publisher@zeroling.com","name":"rax-publisher"}],"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/universal-file_1.1.1_1595921359780_0.6627787179038025"},"_hasShrinkwrap":false},"1.1.2":{"name":"universal-file","author":{"name":"rax"},"version":"1.1.2","description":"文件操作.","main":"lib/index.js","scripts":{"start":"rax-scripts start","build":"rax-scripts build"},"pre-commit":["lint"],"keywords":["Rax"],"engines":{"npm":">=3.0.0"},"dependencies":{"universal-env":"^2.0.0"},"devDependencies":{"rax":"^1.0.8","rax-plugin-api":"^0.2.0","rax-scripts":"^2.0.0"},"_id":"universal-file@1.1.2","_nodeVersion":"10.23.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-RVg2IPNMhV2BkMtVNYTHWflwe0z9/vJeuBSmXczQUl5mnJosECmkdVsAcIUcEHnzCdHl47up713xP/6bpBrvfw==","shasum":"7eff507fbe4d537abe57f27c418c0ead4a8c2848","tarball":"https://registry.npmjs.org/universal-file/-/universal-file-1.1.2.tgz","fileCount":74,"unpackedSize":50601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf5GLCCRA9TVsSAnZWagAAl2cQAIrw3SrmMRQKmrzVN4VM\nHiC4iL0hQVu/h9o97CPtSeWFix+C0ZafRTE3Vqr2+Twwe82pZ6P/Ey22Wld1\nIBCP9DtLHqWyBiPxbAuSUkyxUa9G26XY3pH4LS08up0PIGwlV67r8Sl+8pFL\nahp4DA+LvGdV3fmmeUPSojqd7yR2U0CTOiUOOzC4JX3B7ngCz+y6VBlAFGFA\n7aoIlzB6/BbWsHEd7NPlfzRoQrnYDYgqs24O7ORVRV1nK2/80Md3LZQ+/oRd\nCLKRWgsDu0qwNtpUukvv/H00Zkh/sI3O6DpvXFudo7Xbie6FmHhk7UJtYqAa\nisQSVvdio452rsFY5uJT2lDVTkKpaXz2Wr+2Nr7PXcxE7z6OmlgJ4mb5Pqj9\nQlW80//wJHyNtXlD5W6ZC3PBUUjJzQ1cre9tNMedMrftR2/DTYOeNwRJS39c\nPfXTv2Sq6dXobirUe8a0CCoUC9gDzcSGhGbsc42LN9BJ+HYWpVXsDX7rxTsh\n7KV5qubcdfpDAOnjRGwBCdWUIy3VNk/imvLNfc/Hif4xaMWshk0XlpuD2v8p\n5WPl1sxzpLtp+arppyGYY9FxpfCenSa1eILgECD21S5wLOh+XqqVKr2JysUW\nj6tZD7hm2z01i+4F3wuEgUpjfHDeIKAmeyVKPsg5DrKR54EcwD3zul7vKuv+\nFoHx\r\n=IZpj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFgJSOI1ZtPyzrr8UVzYuwyU5QyFvq4tlA5JJs+Fi06QIhALiAjvCBNMwiRs2kDaJVd8PpdWpLbo0msCjre1wA40fV"}]},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/universal-file_1.1.2_1608803010320_0.6920415769407195"},"_hasShrinkwrap":false},"2.0.0-beta":{"name":"universal-file","version":"2.0.0-beta","description":"--- title: file ---","main":"index.js","module":"index.es.js","unpkg":"index.umd.js","typings":"types/index.d.ts","peerDependencies":{"universal-env":"^4.0.0-beta"},"dependencies":{"@babel/runtime-corejs3":"^7.11.0"},"license":"BSD-3-Clause","author":{"name":"rax"},"_id":"universal-file@2.0.0-beta","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-f7Cfv1EdxH+m5KimPMmZUVHh2oFTxuGoxLzO9FHJ19Z7/URvX5UWsVRigKw/q7Ny7LBE3oQRHzlCI4kh0JIVWg==","shasum":"ecdd7f497a9db34adb37ac8f03a5e73e56ed39d5","tarball":"https://registry.npmjs.org/universal-file/-/universal-file-2.0.0-beta.tgz","fileCount":20,"unpackedSize":433557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/V0cCRA9TVsSAnZWagAAWsYP/3vs2o4QgVAa8yT5hsbb\n9PIfTPL2Ib/3SXVeSYH6zLvvf07B7PinwdVWFi/+QhK/Q5A/gGA4WvL1h2iz\n4RfMUgFyecxvz11W+VabQea3Cdyq9ials8jyaBgmIVYNkyJhvL43PxPndpdy\nsdMow0BrojcAo8kUmSNFiUpFqGW0i0+CY+et1htsXzFtvquakYkqKfML1xwN\nNHhJHE99tM0FRMi4MaOgGzqR7oYXW2InAsShu8v0246V4FoWSSQtczxLMiG+\nuQAnUqTaVZaqYcW7HBn+9vucYhS4DFeYLOK4G30mNCGQ1VB1ZhaFf0Z373/i\nQcHBWYDLXz970SMAnqEAwFusMYRCemsNPeXi3cFk/hX6BFbAdP33Z78BX+zY\nbNyQW/RpPfOmkDsAETPGiODL0SVuPW6ok/nXYx9NBXchzyEbLgmtqVGOt4rZ\nsXY+jspZQ1EKBiQT/RJlGnifJXBiwyPlQDwLluiBcZKsCSZfZ5118EERzqai\n9Lmxl3uRk7705XSVwQG5beOxNVIiU3LSEhTCN8IPglQX+hBHS0qHIT8v4Sm4\nMpV3zpnlO8Qo7fCs7zKBb1FHcrCHKTxk4XN4vw7ERrkLjMWHICK302Epy/pi\nf/9jhBrWiRUa3CzqDnNrRgOPpSNZ1B7xNyfF2IEWpEqmQYrPfTQX4w8X7N4o\nV8AH\r\n=GheG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDn7P2T2A51KvUpxi1nDxxBRdhfWfdrqshOnIyEEElpYAIhAMSKZm/TJzfyJt4cwQX2zVHpF1RvRZg/LOPl1qYoHv6E"}]},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/universal-file_2.0.0-beta_1610439964317_0.7151405427719937"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-21T12:18:14.894Z","1.0.0-beta.1":"2019-11-21T12:18:15.097Z","modified":"2022-05-22T19:24:48.079Z","1.0.0":"2019-12-16T06:17:35.209Z","1.1.0":"2020-05-26T05:51:45.647Z","1.1.1":"2020-07-28T07:29:19.905Z","1.1.2":"2020-12-24T09:43:30.457Z","2.0.0-beta":"2021-01-12T08:26:04.582Z"},"maintainers":[{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"description":"--- title: file ---","author":{"name":"rax"},"readme":"---\ntitle: file\n---\n\n# universal-file \n[![npm](https://img.shields.io/npm/v/universal-file.svg)](https://www.npmjs.com/package/universal-file)\n\nFile operations.\n\n## Support\n<img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\">\n\n## Install\n\n```bash\n$ npm install universal-file --save\n```\n\n## Methods\n\n### `getInfo(options)`\n\nGet file information.\n\n#### Support\n<img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\">\n\n#### Parameters\n| Property        | Type     | Default | Required | Description                                                  | Support                                 |\n| --------------- | -------- | ------- | -------- | ------------------------------------------------------------ | --------------------------------------- |\n| filePath        | `String` |         | √        | The file path                                                | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| digestAlgorithm | `String` | md5   | x        | The algorithm to calculate the file summary can be md5, sha1 | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n\n\n### `getSavedInfo(options)`\n\nGets saved file information.\n\n#### Support\n<img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\">\n\n#### Parameters\n| Property | Type     | Default | Required | Description   | Support                                 |\n| -------- | -------- | ------- | -------- | ------------- | --------------------------------------- |\n| filePath | `String` |         | √        | The file path | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n\n### `getSavedList(options)`\n\nGets all saved file information.\n\n#### Support\n<img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\">\n\n### `openDocument(options)`\n\nOpen a file preview on the new page.\n\n#### Support\n<img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\">\n\n#### Parameters\n| Property | Type     | Default | Required | Description   | Support                                 |\n| -------- | -------- | ------- | -------- | ------------- | --------------------------------------- |\n| filePath | `String` |         | √        | The file path | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| fileType | `String` |         | x        | The file Type | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n\n### `removeSaved(options)`\n\nDelete a saved file.\n\n#### Support\n<img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\">\n\n#### Parameters\n| Property | Type     | Default | Required | Description   | Support                                 |\n| -------- | -------- | ------- | -------- | ------------- | --------------------------------------- |\n| filePath | `String` |         | √        | The file path | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n\n### `save(options)`\n\nSave the file locally.\n\n#### Support\n<img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\">\n\n#### Parameters\n| Property | Type     | Default | Required | Description   | Support                                 |\n| -------- | -------- | ------- | -------- | ------------- | --------------------------------------- |\n| filePath | `String` |         | √        | The file path | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n\n### `upload(options)`\n\nUpload local resources to the developer server.\n\n#### Support\n<img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\">\n\n#### Parameters\n| Property | Type     | Default | Required | Description                          | Support                                 |\n| -------- | -------- | ------- | -------- | ------------------------------------ | --------------------------------------- |\n| url      | `String` |         | √        | Developer server address             | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| filePath | `String | File Object` |         | √        | The path to upload the file resource. In web browser, it can be ei\bther base64 string or a File object. | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| fileName | `String` |         | √        | File name, that is, the corresponding key, the developer in the server side through this key can get the binary content of the file.             | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| fileType | `String` |         | √        | File type supports image, video, audio (image/video/audio). Not required in browser. | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| header | `Object` |         | x        | The HTTP request Header | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| formData | `Object` |         | x        | Additional form data in the HTTP request | <img alt=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n\n\n### `download(options)`\n\nDownload file resources locally.\n\n#### Support\n<img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\">\n\n#### Parameters\n| Property | Type     | Default | Required | Description             | Support                                 |\n| -------- | -------- | ------- | -------- | ----------------------- | --------------------------------------- |\n| url      | `String` |         | √        | Download file address   | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n| header   | `Object` |         | x        | The HTTP request Header | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\"> |\n\n## Example\n\n```js\nimport File from 'universal-file';\n\n// Get file information.\nFile.getInfo({\n  filePath: 'https://resource/apml953bb093ebd2834530196f50a4413a87.video',\n  digestAlgorithm: 'sha1',\n  success: (res)=>{\n    console.log(JSON.stringify(res))\n  }\n});\n\n// You need to save the address to be able to use File.getsavedinfo\nFile.getSavedInfo({\n  filePath: '**filePath**',\n  success: (res) => {\n    console.log(res.size);\n    console.log(res.createTime);\n  }\n});\n\nFile.getSavedList({\n  success:(res) => {\n    console.log(JSON.stringfy(res));\n  }\n});\n\nFile.openDocument({\n  filePath: '**filePath**',\n  fileType: 'pdf',\n  success: (res) => {\n    console.log('open document success');\n  };\n});\n\nFile.removeSaved({\n  filePath: '**filePath**',\n  success:(res) => {\n    console.log('remove success');\n  }\n});\n\nFile.save({\n  filePath: '**filePath**',\n  success:(res) => {\n    console.log('save success');\n  }\n});\n\nFile.upload({\n  url: 'http://httpbin.org/post',\n  fileType: 'image',\n  fileName: 'file',\n  filePath: '**filePath**',\n  success: res => {\n    console.log('upload success');\n  },\n  fail: res => {\n    console.log('upload succefailss');\n  },\n});\n\nFile.download({\n  url: 'http://img.alicdn.com/tfs/TB1x669SXXXXXbdaFXXXXXXXXXX-520-280.jpg',\n  success: res => {\n    console.log(res.filePath);\n  },\n  fail: res => {\n    console.log(res);\n  },\n});\n\n```\n\n","readmeFilename":"README.en-US.md","license":"BSD-3-Clause"}