* Creates a directory. * * @param {string} aPath The directory path. * @return {!Promise } A promise that will resolve with the path of the * created directory.
(aPath)
| 259 | * created directory. |
| 260 | */ |
| 261 | function mkdir(aPath) { |
| 262 | return checkedCall((callback) => { |
| 263 | fs.mkdir(aPath, undefined, (err) => { |
| 264 | if (err && err.code !== 'EEXIST') { |
| 265 | callback(err) |
| 266 | } else { |
| 267 | callback(null, aPath) |
| 268 | } |
| 269 | }) |
| 270 | }) |
| 271 | } |
| 272 | |
| 273 | /** |
| 274 | * Recursively creates a directory and any ancestors that do not yet exist. |
nothing calls this directly
no test coverage detected