private static function getFilesInFolderHelper($strPath)
    {
        // Remove trailing slash if it's there
        if ($strPath[strlen($strPath) - 1] == "/") {
            $strPath = substr($strPath, 0, -1);
        }
        $result = array();
        $dh = opendir($strPath);
        assert($dh !== false); // Does directory exist?
        if ($dh === false) {
            return [];
        }    // if asserts are off

        while (($file = readdir($dh)) !== false) {
            if ($file != "." && $file != "..") {
                if (!is_dir($file)) {
                    array_push($result, $file);
                }
            }
        }
        closedir($dh);

        return $result;
    }