From 41e2d64c86fffc3e507a1ad0788bcb498db2c640 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Sun, 19 May 2013 14:15:49 -0400 Subject: Add support for copying/moving folders between storages, move isIgnoredDir() to Filesystem --- lib/files/filesystem.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/files/filesystem.php') diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index d60d430d77c..99d87011df2 100644 --- a/lib/files/filesystem.php +++ b/lib/files/filesystem.php @@ -453,6 +453,19 @@ class Filesystem { return (in_array($filename, $blacklist)); } + /** + * @brief check if the directory should be ignored when scanning + * NOTE: the special directories . and .. would cause never ending recursion + * @param String $dir + * @return boolean + */ + static public function isIgnoredDir($dir) { + if ($dir === '.' || $dir === '..') { + return true; + } + return false; + } + /** * following functions are equivalent to their php builtin equivalents for arguments/return values. */ -- cgit v1.2.3