public function readFolder($folder, $sort = 0)
    {
        if (substr($folder, -1) != '/') $folder = $folder . '/';
        $this->data = @scandir($folder, $sort) or die("Error reading folder: '{$folder}'.");
        $this->numberOfFiles = count($this->data);
    }