Note: See StorageManager.getDirectory() to understand usage.
getDirectory()None.
A Promise that fulfills with an unpartitioned FileSystemDirectoryHandle object.
SecurityError DomExceptionThrown if access was not granted.
See StorageManager.getDirectory()
document.requestStorageAccess({ getDirectory: true }).then(
(handle) => {
console.log("getDirectory access granted");
await handle.getDirectory();
},
() => {
console.log("getDirectory access denied");
},
);Note: See Using the Storage Access API for a more complete example.