public function recursiveScandir(string $dir)
    {
        $contents = array();

        foreach (scandir($dir) as $file) {
            if ($file == '.' || $file == '..') {
                continue;
            }

            $path = $dir.DIRECTORY_SEPARATOR.$file;

            if (is_dir($path)) {
                $contents = array_merge($contents, $this->recursiveScandir($path));
            } else {
                $contents[] = $path;
            }
        }
        return ($contents);
    }