Handle a file modified event.
1152
def on_modified(self, event):
        """"""
        path = event.src_path
        if path not in self.saw:
            self.saw.add(path)
            self.recompile(path)
1270529
function handleUpdateFile(response) {

        var path = response.path,
            type = response.type,
            $deferredHints = getPendingRequest(path, OFFSET_ZERO, type);

        if ($deferredHints) {
            $deferredHints.resolve();
        }
    }
1005309
public void onFileChange(File file) {
        LOG.info("File updated : {}", file.getAbsolutePath());
        onFileDelete(file);
        onFileCreate(file);
    }
1217930
def on_deleted(self, event):
        
        logger.debug("File deleted: %s", event.src_path)
        if not event.is_directory:
            self.update_file(event.src_path)
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)
218182
def handle_event(self, packet):
        """"""
        if packet.get('command'):
            task = self.send_command_ack(packet['id'], packet['command'])
            self.loop.create_task(task)
903765
@On(Orchid.Lifecycle.FilesChanged.class)
    public void onFilesChanges(Orchid.Lifecycle.FilesChanged event) {
        if (server != null && server.getWebsocket() != null) {
            server.getWebsocket().sendMessage("Files Changed", "");
        }
        context.build();
    }
885497
function onRead( error, file ) {
		var out;
		if ( error ) {
			return clbk( error );
		}
		out = mustache.render( file, opts );
		fs.writeFile( dpath, out, onWrite );
	}
1297504
function _handleActiveEditorChange(event, current, previous) {
        if (current) { // Handle only full editors
            if (_mrofList.length === 0) {
                _initRecentFilesList();
            }

            var file = current.document.file;
            var paneId = current._paneId;
            _addToMROFList(file, paneId, current.getCursorPos(true, "first"));
        }

        if (previous) { // Capture the last know cursor position
            _updateCursorPosition(previous.document.file.fullPath, previous._paneId, previous.getCursorPos(true, "first"));
        }
    }
597005
def dragMoveEvent(self, event):
        """"""
        index = self.indexAt(event.pos())
        if index:
            dst = self.get_filename(index)
            if osp.isdir(dst):
                event.acceptProposedAction()
            else:
                event.ignore()
        else:
            event.ignore()
643114
function handleEvent(dom, handler, e) {
  var ptag = this.__.parent,
    item = this.__.item;

  if (!item)
    { while (ptag && !item) {
      item = ptag.__.item;
      ptag = ptag.__.parent;
    } }

  // override the event properties
  /* istanbul ignore next */
  if (isWritable(e, 'currentTarget')) { e.currentTarget = dom; }
  /* istanbul ignore next */
  if (isWritable(e, 'target')) { e.target = e.srcElement; }
  /* istanbul ignore next */
  if (isWritable(e, 'which')) { e.which = e.charCode || e.keyCode; }

  e.item = item;

  handler.call(this, e);

  // avoid auto updates
  if (!settings$1.autoUpdate) { return }

  if (!e.preventUpdate) {
    var p = getImmediateCustomParentTag(this);
    // fixes #2083
    if (p.isMounted) { p.update(); }
  }
}
488871
def edit_and_execute(event):
    
    buff = event.current_buffer

    buff.open_in_editor(event.cli)
    buff.accept_action.validate_and_handle(event.cli, buff)
1358439
def _handle_stderr_event(self, fd, events):
        """"""

        assert fd == self.fd_stderr

        if events & self.ioloop.READ:
            # got data ready
            if not self.headers_sent:
                payload = self.process.stderr.read()

                data = 'HTTP/1.1 500 Internal Server Error\r\nDate: %s\r\nContent-Length: %d\r\n\r\n' % (get_date_header(), len(payload))
                self.headers_sent = True
                data += payload
            else:
                # see stdout
                logger.error("This should not happen (stderr)")
                data = self.process.stderr.read()

            logger.debug('Sending stderr to client: %r', data)
            self.request.write(data)

        if events & self.ioloop.ERROR:
            logger.debug('Error on stderr')
            # ensure file is closed
            if not self.process.stderr.closed:
                self.process.stderr.close()
            # remove handler
            self.ioloop.remove_handler(self.fd_stderr)
            # if all fds are closed, we can finish
            return self._graceful_finish()
934523
async def handler(event):
    """"""
    q1 = event.pattern_match.group(1)
    q2 = urllib.parse.quote(q1)
    await asyncio.wait([
        event.delete(),
        event.respond(DOCS.format(q1, q2), reply_to=event.reply_to_msg_id)
    ])
170380
def _watch_file(self, filepath, trigger_event=True):
        """"""
        is_new = filepath not in self._watched_files
        if trigger_event:
            if is_new:
                self.trigger_created(filepath)
            else:
                self.trigger_modified(filepath)
        try:
            self._watched_files[filepath] = self._get_modified_time(filepath)
        except OSError:
            return
497032
private void handleInPlaceActions(File result) throws IOException {
    if (isInPlace()) {
      // we operate in-place
      FileUtils.forceDelete(src);
      if (result.isFile()) {
        FileUtils.moveFile(result, src);
      }
      else {
        FileUtils.moveDirectory(result, src);
      }
    }
  }
1315401
function _eventHandler(filePath) {
  // Ignore hidden files
  if (/^\..*/.test(filePath)) return;

  if (extname(filePath).match(reSass)) {
    setTimeout(() => {
      this.callback();
      this.refresh(filePath);
    });
    return;
  }

  this.callback();
  Logger.info(`LiveReload: ${filePath}`);
}