private static function myFilePathParse(string $directorySeparator, string $path, callable $partValidator, callable $stringDecoder = null, ?bool &$isAbsolute = null, ?int &$aboveBaseLevel = null, ?string &$drive = null, ?array &$directoryParts = null, ?string &$filename = null, ?string &$error = null): bool
    {
        $drive = null;

        // If on Window, try to parse drive.
        if (self::myIsWindows()) {
            $driveAndPath = explode(':', $path, 2);

            if (count($driveAndPath) === 2) {
                $drive = $driveAndPath[0];
                if (!self::myDriveValidator($drive, $error)) {
                    return false;
                }

                $drive = strtoupper($drive);
                $path = $driveAndPath[1];
            }
        }

        $result = self::myParse(
            $directorySeparator,
            DIRECTORY_SEPARATOR !== '\'' ? str_replace('/', DIRECTORY_SEPARATOR, $path) : $path,
            $partValidator,
            $stringDecoder,
            $isAbsolute,
            $aboveBaseLevel,
            $directoryParts,
            $filename,
            $error
        );

        // File path containing a drive and relative path is invalid.
        if ($drive !== null && !$isAbsolute) {
            $error = 'Path can not contain drive "' . $drive . '" and non-absolute path "' . $path . '".';

            return false;
        }

        return $result;
    }