1

I am get directory from file system and read data.

 try {
   const directoryHandle = await showDirectoryPicker({
         startIn: startIn.value,
   });
   for await (const [name, fileHandle] of directoryHandle) {
      directory.textContent =  directory.textContent + `${name} - ${fileHandle.kind}`
    }
 }
 catch (e) {
    console.log(e);
 }

then I want to get data from this directory and i want to get list all directoryes.

I am try this

const opfsRoot = await  navigator.storage.getDirectory(); 
const existingDirectoryHandle = await opfsRoot.getDirectoryHandle('Directory');

But i can't see my directory.

How can I get an already added directory ? How can I get a list of added directories ?

Sergey
  • 418
  • 1
  • 7
  • 21

0 Answers0