1

I try to traverse dir with html5 file api (using drag folder) and have code like this:

function traverse(entry) {
if (entry.isDirectory) {
 dirReader = entry.createReader();
 dirReader.readEntries(function (entries) {
 for (var i = 0; i < entries.length; i++) {
 someFoldersArray.push(entries[i]);
 traverse(entries[i]);
}})}

So, i want to send array of folders to server, when recursion will finished. How can i do it? dirReader.readEntries - this method is asynchronized.

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.