(encoding, progress)
| 82 | (url) => { |
| 83 | return { |
| 84 | async readFile(encoding, progress) { |
| 85 | const data = await ajax.get(url, { |
| 86 | responseType: "arraybuffer", |
| 87 | contentType: "application/x-www-form-urlencoded", |
| 88 | onprogress: progress, |
| 89 | }); |
| 90 | |
| 91 | if (encoding) { |
| 92 | return await decode(data, encoding); |
| 93 | } |
| 94 | |
| 95 | return data; |
| 96 | }, |
| 97 | async writeFile(content, progress) { |
| 98 | return ajax.post(url, { |
| 99 | data: content, |