private function buildFilePath (array $directories, string $fileName) : string
    {
        $dir = !empty($directories)
            ? "/" . implode("/", $directories)
            : "";

        $file = "" !== $fileName
            ? "/{$fileName}"
            : "";

        return $dir . $file;
    }