protected function makeFilePathFromRequest(ServiceRequestInterface $request)
    {
        $location = $request->getLocation();
        $method   = $request->getMethod();

        if ( ! empty($location) && ! empty($method)) {

            return rtrim($location(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $method();
        }

        if ( ! empty($location)) return $location;

        if ( ! empty($method)) return $method;

        throw new CouldNotConnectException(
            'No path given for FileService. Set a location and/or method to build a valid path.'
        );
    }