public function countFiles($dirName, $foldersOnly = false, $nonEmptyCheckOnly = false) { if ($foldersOnly) { return 0; } // WILL USE IMAP FUNCTIONS TO COUNT; $tmpHandle = opendir($dirName); $this->logDebug("COUNT : " . imapAccessWrapper::getCurrentDirCount()); return imapAccessWrapper::getCurrentDirCount(); }