getDirectory

suspend fun FileSystemDirectoryEntry.getDirectory(path: String? = undefined, options: FileSystemFlags = unsafeJso()): FileSystemEntry(source)

The FileSystemDirectoryEntry interface's method getDirectory() returns a somewhere within the directory subtree rooted at the directory on which it's called.

MDN Reference