MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / createDir

Function createDir

src/fileSystem/internalFs.js:160–179  ·  view source on GitHub ↗

* Create a directory * @param {string} path * @param {string} dirname * @returns {Promise}

(path, dirname)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

resolveFunction · 0.85
statsMethod · 0.80
setMessageFunction · 0.70

Tested by

no test coverage detected