Sets the flag indicating that the event file should be flushed at each call.
765146
def with_flush_immediately(self, flush_immediately: Optional[bool]=True)\
            -> 'BaseTensorBoardTask':
        
        self._flush_immediately = flush_immediately
        return self
127217
function onWritten(writeErr) {
      var flags = fo.getFlags({
        overwrite: optResolver.resolve('overwrite', file),
        append: optResolver.resolve('append', file),
      });
      if (fo.isFatalOverwriteError(writeErr, flags)) {
        return callback(writeErr);
      }

      callback(null, file);
    }
512624
private void flushEventBuffer() {
        Holder<T> holder = buffer.get();
        logger.accept(holder.getBuffer().get());
        holder.clear();
    }
831192
public final void setCurrentFile(final int n) {
        if (SwingUtilities.isEventDispatchThread()) {
            setCurrentFileIntern(n);
        } else {
            try {
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        setCurrentFileIntern(n);
                    }
                });
            } catch (final Exception ex) {
                ignore();
            }
        }
    }
578083
def on_modified(self, event):
        
        logger.debug("file modified: %s", event.src_path)
        if not event.is_directory:
            self.update_file(event.src_path)
208979
public void setEnable(boolean flag)
    {
        if (mEnabled == flag)
        {
            return;
        }
        mEnabled = flag;
        if (flag)
        {
            mContext.registerDrawFrameListener(this);
            mContext.getApplication().getEventReceiver().addListener(this);
            mAudioEngine.resume();
        }
        else
        {
            mContext.unregisterDrawFrameListener(this);
            mContext.getApplication().getEventReceiver().removeListener(this);
            mAudioEngine.pause();
        }
    }
943595
protected void onFileChoose(JFileChooser fileChooser, ActionEvent actionEvent)
	{
		final int returnVal = fileChooser.showOpenDialog(parent);

		if (returnVal == JFileChooser.APPROVE_OPTION)
		{
			final File file = fileChooser.getSelectedFile();
			onApproveOption(file, actionEvent);
		}
		else
		{
			onCancel(actionEvent);
		}
	}
1005309
public void onFileChange(File file) {
        LOG.info("File updated : {}", file.getAbsolutePath());
        onFileDelete(file);
        onFileCreate(file);
    }
257224
def set_valid(self, boolean):
        '''
        
        '''
        old_state = self.is_valid()
        self.valid_file = boolean

        if old_state != self.valid_file:
            self.call_valid(self.valid_file)
295130
public void onShutdown() {
        for (String listenerName : registeredFileListeners.keySet()) {
            logger.info("Deregistering File Listener: " + listenerName);
            FileListener listener = registeredFileListeners.get(listenerName);
            listener.stopListening();
        }
    }
513023
public function flush(): void
    {
        while (false == $this->events->isEmpty()) {
            list($topic, $message) = $this->events->dequeue();

            $this->realProducer->sendEvent($topic, $message);
        }

        while (false == $this->commands->isEmpty()) {
            list($command, $message) = $this->commands->dequeue();

            $this->realProducer->sendCommand($command, $message);
        }
    }
1018505
function(eventArgs) {
                if (eventArgs.kind === Windows.ApplicationModel.Activation.ActivationKind.pickSaveFileContinuation) {
                    var file = eventArgs.file;
                    saveFile(file);
                    webUIApp.removeEventListener("activated", fileSaveHandler);
                }
            }
590176
private void flush(Collection<Record> recordsToBeFlushed, boolean backup) {
        for (Record record : recordsToBeFlushed) {
            mapDataStore.flush(record.getKey(), record.getValue(), backup);
        }
    }
609732
def on_moved(self, event):
        
        self.on_deleted(events.FileDeletedEvent(event.src_path))
        self.on_created(events.FileCreatedEvent(event.dest_path))
333780
def _set_status_flag(self, status):
        

        # Remove previous status flag file.
        flag_file_path = self._flag_file_path()
        try:
            os.remove(flag_file_path)
        except:
            # Print message only if the failure to remove the status flag
            # is unexpected; there's no flag for initialization, so we
            # can't remove the file.
            if self.status != "initializing":
                print("Could not remove flag file: '{}'".format(flag_file_path))
            pass

        # Set new status.
        prev_status = self.status
        self.status = status
        self._create_file(self._flag_file_path())
        print("\nChanged status from {} to {}.".format(
                prev_status, self.status))
864315
def on_moved(self, event):
        
        logger.debug("file moved: %s -> %s", event.src_path, event.dest_path)
        if not event.is_directory:
            self.update_file(event.dest_path)
1279913
def flush(self):
    """"""
    self.acquire()
    try:
      self.stream.flush()
    except (EnvironmentError, ValueError):
      # A ValueError is thrown if we try to flush a closed file.
      pass
    finally:
      self.release()