Releases: GoogleChromeLabs/browser-fs-access
Releases · GoogleChromeLabs/browser-fs-access
v0.35.0
v0.34.1
v0.34.0
v0.33.0
v0.32.1
- When the File System Access API is supported, the
directoryOpen()
function now returns the directory handle in the results array in case the directory is empty. Before, the function would return an empty array. This is a breaking change.
Warning
Breaking change:
// If the directory is empty, rather than `[]`, // this function now returns `[directoryHandle]` // when the File System Access API is supported. const files = await directoryOpen(); // Check if there are files in the directory. if (files.length && !(files[0] instanceof File)) { // The directory is empty and the returned item // is a `FileSystemDirectoryHandle`. const directoryHandle = files[0]; return directoryHandle; } // There are files in the directory. for (file of files) { // Iterate over the files. }