@classmethod
def make_request(cls, moop, path, dfi=None, filesize=None):
    """
        Generates a request for RequestFileTransfer

        :param moop: Mode of operation. Can be AddFile(1), DeleteFile(2), ReplaceFile(3), ReadFile(4), ReadDir(5). See :class:`RequestFileTransfer.ModeOfOperation<udsoncan.services.RequestFileTransfer.ModeOfOperation>`
        :type moop: int

        :param path: String representing the path to the target file or directory.
        :type path: string

        :param dfi: DataFormatIdentifier defining the compression and encryption scheme of the data. 
                If not specified, the default value of 00 will be used, specifying no encryption and no compression. 
                This value is only used when ModeOfOperation is : ``AddFile``, ``ReplaceFile``, ``ReadFile``
        :type dfi: :ref:`DataFormatIdentifier<DataFormatIdentifier>`

        :param filesize: The filesize of the file to write when ModeOfOperation is ``AddFile`` or ``ReplaceFile``. 
            If filesize is an object of type :ref:`Filesize<Filesize>`, the uncompressed size and compressed size will be encoded on
            the minimum amount of bytes necessary, unless a ``width`` is explicitly defined. If no compressed size is given or filesize is an ``int``,
            then the compressed size will be set equal to the uncompressed size or the integer value given as specified by ISO-14229
        :type filesize: :ref:`Filesize<Filesize>` or int

        :raises ValueError: If parameters are out of range, missing or wrong type
        """
    from udsoncan import Request, Filesize
    if not isinstance(moop, int):
        raise ValueError('Mode of operation must be an integer')
    if moop not in [cls.ModeOfOperation.AddFile, cls.ModeOfOperation.
        DeleteFile, cls.ModeOfOperation.ReplaceFile, cls.ModeOfOperation.
        ReadFile, cls.ModeOfOperation.ReadDir]:
        raise ValueError('Mode of operation of %d is not a known mode' % moop)
    if not isinstance(path, str):
        raise ValueError('Given path must be a valid string')
    if len(path) <= 0:
        raise ValueError('Path must be a string longer than 0 character')
    path_ascii = path.encode('ascii')
    if len(path_ascii) > 65535:
        raise ValueError(
            'Path length must be smaller or equal than 65535  bytes (16 bits) when encoded in ASCII'
            )
    use_dfi = moop in [cls.ModeOfOperation.AddFile, cls.ModeOfOperation.
        ReplaceFile, cls.ModeOfOperation.ReadFile]
    use_filesize = moop in [cls.ModeOfOperation.AddFile, cls.
        ModeOfOperation.ReplaceFile]
    if use_dfi:
        dfi = cls.normalize_data_format_identifier(dfi)
    elif dfi is not None:
        raise ValueError(
            'DataFormatIdentifier is not needed with ModeOfOperation=%d' % moop
            )
    if use_filesize:
        if filesize is None:
            raise ValueError(
                'A filesize must be given for this mode of operation')
        if isinstance(filesize, int):
            filesize = Filesize(filesize)
        if not isinstance(filesize, Filesize):
            raise ValueError(
                'Given filesize must be a valid Filesize object or an integer')
        if filesize.uncompressed is None:
            raise ValueError(
                'Filesize needs at least an Uncompressed file size')
        if filesize.compressed is None:
            filesize = Filesize(uncompressed=filesize.uncompressed,
                compressed=filesize.uncompressed, width=filesize.get_width())
    elif filesize is not None:
        raise ValueError('Filesize is not needed with ModeOfOperation=%d' %
            moop)
    data = moop.to_bytes(1, 'big')
    data += len(path_ascii).to_bytes(2, 'big')
    data += path_ascii
    if use_dfi:
        data += dfi.get_byte()
    if use_filesize:
        data += filesize.get_width().to_bytes(1, 'big')
        data += filesize.get_uncompressed_bytes()
        data += filesize.get_compressed_bytes()
    request = Request(cls, data=data)
    return request
