Opens the storage writer.

    Raises:
      IOError: if the storage writer is already opened.
      OSError: if the storage writer is already opened.
191093
def Open(self):
    
    if self._storage_file:
      raise IOError('Storage writer already opened.')

    self._storage_file = self._CreateStorageFile()

    if self._serializers_profiler:
      self._storage_file.SetSerializersProfiler(self._serializers_profiler)

    if self._storage_profiler:
      self._storage_file.SetStorageProfiler(self._storage_profiler)

    self._storage_file.Open(path=self._output_file, read_only=False)

    self._first_written_event_source_index = (
        self._storage_file.GetNumberOfEventSources())
    self._written_event_source_index = self._first_written_event_source_index
688872
def save(self, *args, **kwargs):
        
        writer = None
        if 'writer' in kwargs.keys():
            writer = kwargs.pop('writer')
        else: writer = default_writer
        super().save(*args, **kwargs, writer=writer)
958149
def write(self, writer: WriteStream) -> None:
        
        for part in self._raw:
            writer.write(bytes(part))
466945
def open(self, *args, **kwargs):
        
        args, kwargs = self.__process__(*args, **kwargs)
        return Popen(args, **kwargs)
481263
async def open(self) -> 'Tails':
        

        LOGGER.debug('Tails.open >>>')

        self._reader_handle = await blob_storage.open_reader('default', self._tails_config_json)

        LOGGER.debug('Tails.open <<<')
        return self
1134888
def rewind(self):
        ''''''
        if self.mode != READ:
            raise OSError("Can't rewind in write mode")
        self.fileobj.seek(0)
        self._new_member = True
        self.extrabuf = b""
        self.extrasize = 0
        self.extrastart = 0
        self.offset = 0
1327321
def _open(self):
        
        self._sample = None

        formatting_parameters0 = {'encoding':        'auto',
                                  'delimiter':       'auto',
                                  'line_terminator': 'auto',
                                  'escape_char':     '\\',
                                  'quote_char':      '"'}
        formatting_parameters1 = self._helper.pass1(self._filename, formatting_parameters0)
        self._formatting_parameters = formatting_parameters1

        # Detect encoding.
        if formatting_parameters1['encoding'] == 'auto':
            self._get_sample('rb', None)
            self._detect_encoding()

        # Detect delimiter.
        if formatting_parameters1['delimiter'] == 'auto':
            self._get_sample('rt', formatting_parameters1['encoding'])
            self._detect_delimiter()

        # Detect line terminators.
        if formatting_parameters1['line_terminator'] == 'auto':
            if not self._sample:
                self._get_sample('rt', formatting_parameters1['encoding'])
            self._detect_line_ending()

        self._formatting_parameters = self._helper.pass2(self._filename,
                                                         self._formatting_parameters,
                                                         formatting_parameters1)

        self._open_file('rt', formatting_parameters1['encoding'])
        self._csv_reader = csv.reader(self._file,
                                      delimiter=self._formatting_parameters['delimiter'],
                                      escapechar=self._formatting_parameters['escape_char'],
                                      lineterminator=self._formatting_parameters['line_terminator'],
                                      quotechar=self._formatting_parameters['quote_char'])  # Ignored

        self._sample = None
1201630
def open(self):
        
        self._wr_lock.acquire()
        self._rd_lock.acquire()
        try:
            self.data_in = EMPTY_BUFFER
            self._running.set()
            sock_addresses = self._get_socket_addresses()
            self.socket = self._find_address_and_connect(sock_addresses)
            self.poller = Poller(self.socket.fileno(), self._exceptions,
                                 timeout=self._parameters['timeout'])
            self._inbound_thread = self._create_inbound_thread()
        finally:
            self._wr_lock.release()
            self._rd_lock.release()
1132786
public function open()
    {
        if ($this->isOpen() === true) {
            $msg = "The MemoryStream is already open.";
            throw new MemoryStreamException($msg, $this, MemoryStreamException::ALREADY_OPEN);
        }

        $this->setOpen(true);
    }
989045
def _write(self, to_write):
        
        self._file.write(to_write.encode(self._encoding or
                                         self._default_encoding))
214002
def open(self):
        """"""
        if VERBOSE:
            _print_out('\nDummy_serial: Opening port\n')

        if self._isOpen:
            raise IOError('Dummy_serial: The port is already open')
            
        self._isOpen = True
        self.port = self.initial_port_name
366638
public ReadWritePair openReadWrite(boolean isAutoFlush) throws IOException
  {
    clearStatusCache();

    StreamImpl impl = openReadWriteImpl();
    //impl.setPath(this);

    WriteStreamOld writeStream = new WriteStreamOld(impl);
    ReadStreamOld readStream;

    if (isAutoFlush)
      readStream = new ReadStreamOld(impl);
    else
      readStream = new ReadStreamOld(impl);

    return new ReadWritePair(readStream, writeStream);
  }
997548
def open(self):
        
        if self._is_open:
            raise HIDException("Failed to open device: HIDDevice already open")

        path = self.path.encode('utf-8')
        dev = hidapi.hid_open_path(path)

        if dev:
            self._is_open = True
            self._device = dev
        else:
            raise HIDException("Failed to open device")
747437
protected function openWriter()
    {
        if ($this->shouldAddBOM) {
            // Adds UTF-8 BOM for Unicode compatibility
            $this->globalFunctionsHelper->fputs($this->filePointer, EncodingHelper::BOM_UTF8);
        }
    }
559964
async def open_async(self):
        
        if not self.loop:
            self.loop = asyncio.get_event_loop()
        await self.partition_manager.start_async()
1360362
public void openWrite()
  {
    TempCharBuffer ptr = _head;

    _head = null;
    _tail = null;

    TempCharBuffer.freeAll(ptr);
  }
704148
public boolean createNewFile() throws IOException
  {
    synchronized (LOCK) {
      if (! exists()) {
        clearStatusCache();
        WriteStreamOld s = openWrite();
        s.close();
        return true;
      }
    }

    return false;
  }