pyvmomi-community-samples
pyvmomi-community-samples copied to clipboard
List empty directories in a datastore
Describe the bug
I tried to list all all empty directories on a datastore but was not successful with
search_spec = vim.host.DatastoreBrowser.SearchSpec(query=[vim.host.DatastoreBrowser.FolderQuery()])
datastore.browser.SearchDatastoreSubFolders_Task(f"[{datastore.summary.name}]", search_spec)
Only directories like scratch are listed. What can I do about this?
Reproduction steps
...
Expected behavior
List all directories including empty ones, and ones containing vm specific files.
Additional context
No response