private function myFilenameToString(?callable $stringEncoder = null): string
    {
        if ($this->myFilename === null) {
            return '';
        }

        if ($stringEncoder !== null) {
            return $stringEncoder($this->myFilename);
        }

        return $this->myFilename;
    }