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

Method constructor

src/lib/fileList.js:472–480  ·  view source on GitHub ↗

* Create a tree using constructor * @param {string} name * @param {string} root * @param {string} url * @param {boolean} isDirectory

(name, url, isDirectory, mime, size, modifiedDate)

Source from the content-addressed store, hash-verified

470 * @param {boolean} isDirectory
471 */
472 constructor(name, url, isDirectory, mime, size, modifiedDate) {
473 this.#name = name;
474 this.#url = url;
475 this.mime = mime || null;
476 this.size = size || 0;
477 this.modifiedDate = normalizeModifiedDate(modifiedDate);
478 this.#children = isDirectory ? this.#childrenArray() : null;
479 this.#parent = null;
480 }
481
482 #childrenArray() {
483 const ar = [];

Callers

nothing calls this directly

Calls 2

#childrenArrayMethod · 0.95
normalizeModifiedDateFunction · 0.70

Tested by

no test coverage detected