dir_list($dir, $sort_order, $pattern)

Return a $sort_order sorted list of files matching regex $pattern in a directory.

Calls $sort_order, which can be one of:

        alpha - alphabetical
reverse_alpha - alphabetical, reversed
  high_to_low - numeric, high to low
  low_to_high - numeric, low to high
file_put_contents($file, $contents)

Write $contents string to $file path. Because:

https://secure.php.net/manual/en/function.file-put-contents.php

file_get_contents($file)

Get contents string of $file path. Because:

https://secure.php.net/manual/en/function.file-get-contents.php

1;