The dirtree function builds an array of directories from a full directory path or an array of full directory paths.