web api instance method
StorageAccessHandle: getDirectory() method
[!NOTE] See
getDirectory()to understand usage.
Syntax
getDirectory()
Parameters
None.
Return value
A Promise that fulfills with an unpartitioned FileSystemDirectoryHandle object.
Exceptions
SecurityErrorDomException- : Thrown if access was not granted.
See getDirectory()
Examples
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.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.