'Create the file for the named pipe and store it in the \'_npipe_file\'
property of the class.
:param sec_attributes: type win32security.SECURITY_ATTRIBUTES
The default value is -1 which uses the default security attributes.
This means that the file handle will NOT be inherited when
a new process is created.'

def create_file(self, sec_attributes=(-1)):

    try:
        self._npipe_file = ovs_winutils.create_file(self.name, attributes=sec_attributes)
        try:
            ovs_winutils.set_pipe_mode(self._npipe_file, ovs_winutils.win32pipe.PIPE_READMODE_BYTE)
        except ovs_winutils.pywintypes.error as e:
            raise NamedPipeException(('Could    not    set    pipe    read    mode    to    byte.    Error:    %s.' % e.strerror), e.winerror)
    except ovs_winutils.pywintypes.error as e:
        raise NamedPipeException(('Could    not    create    file    for    named    pipe.    Error:    %s.' % e.strerror), e.winerror)
