You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
directoryOpen() returns a 0 length array of FileWithDirectoryAndFileHandle if there is nothing inside the directory having been opened. In my case I'm opening with a mode of readwrite, so Chrome nicely prompts me that the application will have access to the directory. Per https://wicg.github.io/file-system-access/#api-filesystemdirectoryhandle, I can create new files by calling getFileHandle(create=true) on a directory handle; however, because directoryOpen returns 0 length, I don't have a directory handle to create the initial file in.
If there's an alternate way to accomplish this, please advise; but, I think the fix is to include a FileSystemDirectoryHandle as part of the directoryOpen response.
(I'm making an app with no server; data is stored in localstorage, and I'm adding sync to and from the filesystem.)