MCPcopy Create free account
hub / github.com/Crain99/cc-reverse / copyFiles

Function copyFiles

src/core/resourceProcessor.js:712–732  ·  view source on GitHub ↗

* 复制文件 * @returns {Promise }

()

Source from the content-addressed store, hash-verified

710 const item = data[i];
711 if (!item || typeof item !== 'object') continue;
712
713 if (Array.isArray(item)) {
714 // Nested document array inside packed-like structure
715 if (this.isDocumentArray(item)) {
716 this.processDocumentArray(item, key);
717 } else {
718 this.writeProcessedData(item, key);
719 }
720 } else if (item.__type__) {
721 const handler = this.typeHandlers.get(item.__type__);
722 if (handler) handler(item, key, { parentData: data, index: i });
723 }
724 }
725 },
726
727 dispatchAsset(data, key, parentData, index) {
728 if (!data || !data.__type__) return;
729 const handler = this.typeHandlers.get(data.__type__);
730 if (!handler) return;
731 handler(data, key, { parentData: parentData || data, index: index != null ? index : null });
732 },
733
734 // ---- type handlers ----
735

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected