protected function listTempDir($dir = ''){
        $arrFiles = [];
        $scandir = ($dir != '')?$dir:'.';
        $objects = scandir($scandir);
        foreach ($objects as $object) {
            if ($object == "." || $object == "..") {
                continue;
            }
            $objectPath = ($dir != '')?$dir.DIRECTORY_SEPARATOR.$object:$object;
            if (is_dir($objectPath)) {
                $arrFiles = array_merge($arrFiles, $this->listTempDir($objectPath));
            } else {
                $arrFiles[] = $objectPath;
            }
        }
        return $arrFiles;
    }