| 12345678910111213141516171819202122232425 |
- <?
- require 'config.php';
- # True if the input path is junk -- self-links, OS X noise, etc.
- function isJunk($path) {
- $path = basename($path);
-
- # Ignore certain fixed paths
- foreach (array('.', '..', '.DS_Store') as $value) {
- if ($path == $value) {
- return true;
- }
- }
-
- # Ignore ._ paths
- if (preg_match('/^\.\_/', $path)) {
- return true;
- }
-
- # Otherwise the path is good
- return false;
- }
- ?>
|