({ path }, options)
| 10 | |
| 11 | module.exports = { |
| 12 | getDirectory ({ path }, options) { |
| 13 | if (options == null) { options = {} } |
| 14 | if (!_.string.endsWith(path, '/')) { |
| 15 | path = path + '/' |
| 16 | } |
| 17 | return fetchJson(`/file/${path}`, options).then(res => JSON.parse(res)) |
| 18 | }, |
| 19 | |
| 20 | saveFile ({ url, filename, mimetype, path, force }, options) { |
| 21 | if (options == null) { options = {} } |