protected static function splitPathExt($path) {
        if (substr($path, -1) !== '/' && ($pos = strrpos($path, '.')) !== false) {
            $ext = substr($path, $pos);
            $path = substr($path, 0, $pos);
            return [$path, $ext];
        } else {
            return [$path, ''];
        }
    }