public function directoryLength($directory = '')
    {
        if ($items = glob($this->rootDir .'/'. trim($directory, '/') .'/*')) {
            return count($items);
        }

        return 0;
    }