read and list directory function with filter option.
returns only directories which match a prefix filter.

copy the code of directories / read dir and list

click here to select all the code