this is mostly directory to array functions that read a directory, and converted it to an array, that in turn you have to read. This means looping through a directory's contents, saving it to an array (that takes up memory), then looping through the array again to read the directory contents!