Created
February 5, 2014 12:43
-
-
Save r3nya/8822824 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function show_files($dir_name, $regexp = '/^([^.])/') { | |
$files = preg_grep($regexp, scandir($dir_name)); | |
if ($regexp != '/^([^.])/') { | |
$files = preg_grep('/^([^.])/', scandir($dir_name)); | |
} | |
if ($key_del = array_search('key.txt', $files)) { | |
unset($files[$key_del]); | |
} | |
return set('files', $files); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment