Lets say I have a refetence to a FileSystemDirectoryHandle, obtained by showDirectoryPicker()
, which might have been deleted (at some point in time after referencing). What is the proper API to check if it points to an existing directory?
I can try-catch for await (const entry of directory.values())
but I wonder if there is something more appropriate.
I was thinking of using getDirectoryHandle
but I do not have parent reference, nor does it accept empty name argument.