AttachmentManager::countFiles PHP Метод

countFiles() публичный Метод

Count the number of files and directories in a given folder minus the thumbnail folders and thumbnails.
public countFiles ( $path )
    function countFiles($path)
    {
        $total = 0;
        if (is_dir($path)) {
            $d = @dir($path);
            while (false !== ($entry = $d->read())) {
                //echo $entry."<br>";
                if (substr($entry, 0, 1) != '.' && $this->isThumbDir($entry) == false && $this->isTmpFile($entry) == false && $this->isThumb($entry) == false) {
                    $total++;
                }
            }
            $d->close();
        }
        return $total;
    }