* Create a directory * @param {string} path * @param {string} dirname * @returns {Promise}
(path, dirname)
| 158 | * @returns {Promise} |
| 159 | */ |
| 160 | createDir(path, dirname) { |
| 161 | return new Promise((resolve, reject) => { |
| 162 | reject = setMessage(reject); |
| 163 | window.resolveLocalFileSystemURL( |
| 164 | path, |
| 165 | (fs) => { |
| 166 | fs.getDirectory( |
| 167 | dirname, |
| 168 | { create: true }, |
| 169 | async () => { |
| 170 | const stats = await this.stats(Url.join(path, dirname)); |
| 171 | resolve(stats.url); |
| 172 | }, |
| 173 | reject, |
| 174 | ); |
| 175 | }, |
| 176 | reject, |
| 177 | ); |
| 178 | }); |
| 179 | }, |
| 180 | |
| 181 | /** |
| 182 | * Copy a file or directory to another location |
nothing calls this directly
no test coverage detected