MCPcopy Create free account
hub / github.com/error311/FileRise / readAllDirectoryEntries

Function readAllDirectoryEntries

public/js/sharedDropView.js:637–654  ·  view source on GitHub ↗
(reader)

Source from the content-addressed store, hash-verified

635 }
636
637 function readAllDirectoryEntries(reader) {
638 return new Promise((resolve) => {
639 const entries = [];
640 const readBatch = function () {
641 reader.readEntries(function (batch) {
642 if (!batch || !batch.length) {
643 resolve(entries);
644 return;
645 }
646 for (let i = 0; i < batch.length; i++) {
647 entries.push(batch[i]);
648 }
649 readBatch();
650 });
651 };
652 readBatch();
653 });
654 }
655
656 async function walkEntry(entry, prefix) {
657 if (!entry) return [];

Callers 1

walkEntryFunction · 0.85

Calls 1

readBatchFunction · 0.85

Tested by

no test coverage detected