public function splitName(string $defaultExtension = ""): array
    {
        $filename = basename($this->path);
        $extpos = strrpos($filename, ".");
        if ($extpos === false || $extpos === 0) {
            $name = $filename;
            $ext = $defaultExtension;
        }
        else {
            $name = substr($filename, 0, $extpos);
            $ext = substr($filename, $extpos + 1);
        }
        return [$name, $ext];
    }