public function normalizeFile(string $file, int $options = self::MODE_DEFAULT): string
    {
        $file = \str_replace('\\', '/', $file);
        if (false === \strrpos($file, '/')) {
            $mess = 'An empty path is NOT allowed';
            throw new \DomainException($mess);
        }
        [$fileName, $path] = \explode('/', \strrev($file), 2);
        $path = \strrev($path);
        $fileName = \trim(strrev($fileName));
        if ('' === $fileName) {
            $mess = 'An empty file name is NOT allowed';
            throw new \DomainException($mess);
        }
        if (!\ctype_print($fileName)) {
            $mess = 'Using any non-printable characters in the file name is NOT allowed';
            throw new \DomainException($mess);
        }
        return $this->normalizePath($path, $options) . $fileName;
    }