execute
Lists directory contents from the filesystem with optional depth and pattern filtering.
Performs validation before listing:
Validates the depth parameter is positive
Verifies the path exists in the filesystem
Confirms the path points to a directory
Return
Result containing the directory tree with its contents and metadata
Parameters
args
arguments specifying the directory path, depth, and optional filter
Throws
if the path doesn't exist, isn't a directory, depth is invalid, or filter matches nothing