Notify the change strategy that this file was deleted and does not need to be tracked anymore.

@param string $pathAndFilename
@return void
181834
public function setFileDeleted($pathAndFilename)
    {
        if (isset($this->filesAndModificationTimes[$pathAndFilename])) {
            unset($this->filesAndModificationTimes[$pathAndFilename]);
            $this->modificationTimesChanged = true;
        }
    }
195675
public function deleteFile($path)
  {
    $entity = $this->getEntity($path);

    if (is_null($entity)) {
      $result = null;
    } elseif (!$entity->file_exists() || !$entity->is_file()) {
      $result = null;
    } else {
      $result = Entity_Deleted::newInstance($entity);

      $changes = $this->getChanges();
      $changes->add($path, $result);
    }

    return $result;
  }
166885
private function _changeDirectory($path)
    {
        if ($this->isSFTP()) {
            $changed = @$this->ftp->chdir($path);
        } else {
            $changed = @ftp_chdir($this->ftp, $path);
        }
        if (!$changed) {
            $this->fail("couldn't change directory {$path}");
        }
    }
450723
public function check($path)
    {
        foreach ($this->getFiles($path) as $file) {
            $this->checkFile($file);
        }
    }
50129
public void checkAndNotify()
      throws IOException {
    /* fire onStart() */
    for (final PathAlterationListener listener : listeners.values()) {
      listener.onStart(this);
    }

    /* fire directory/file events */
    final Path rootPath = rootEntry.getPath();

    if (fs.exists(rootPath)) {
      // Current existed.
      checkAndNotify(rootEntry, rootEntry.getChildren(), listPaths(rootPath));
    } else if (rootEntry.isExists()) {
      // Existed before and not existed now.
      checkAndNotify(rootEntry, rootEntry.getChildren(), EMPTY_PATH_ARRAY);
    } else {
      // Didn't exist and still doesn't
    }

    /* fire onStop() */
    for (final PathAlterationListener listener : listeners.values()) {
      listener.onStop(this);
    }
  }
298385
public function handleFileSize(string $fileName): void
	{
		if ($this->presenter->isAjax()) {
			$this->template->files = [$this->getFileInfo($fileName, true)];
			$this->redrawControl('itemsContainer');
		} else {
			exit;
		}
	}
1095240
def _notify_deleted_file(self):
        
        self.file_deleted.emit(self.editor)
        # file deleted, disable file watcher
        self.enabled = False
2497
public static function delete(string $path) : void
    {
        $exception = null;

        try {
            $success = ErrorCatcher::run(static function() use ($path) {
                if (is_dir($path)) {
                    return rmdir($path);
                }

                return unlink($path);
            });

            if ($success === true) {
                return;
            }
        } catch (\ErrorException $e) {
            $exception = $e;
        }

        throw new IoException('Error deleting ' . $path, 0, $exception);
    }
177888
public function handleRename(string $fileName): void
	{
		if ($this->presenter->isAjax() && $this->editable) {
			$this->template->files = [$this->rename($fileName)];
			$this->redrawControl('itemsContainer');
		} else {
			exit;
		}
	}
244513
public function deleteDirectory($path)
    {
        $prefixedUri = $this->getPrefixedUri($path);
        $this->metadataHandler->deleteDirectory($prefixedUri);
        $this->binarydataHandler->deleteDirectory($prefixedUri);
    }
353324
public function delete() {
        if ($this->_oldFile != $this->path . $this->name) {
            unlink($this->_oldFile);
        }

        unlink($this->path . $this->name);
    }
771347
public function importFromFile($pathAndFilename)
    {
        if (!file_exists($pathAndFilename)) {
            throw new NeosException(sprintf('Error: File "%s" does not exist.', $pathAndFilename), 1540934412);
        }

        /** @var Site $importedSite */
        $site = null;
        $xmlReader = new \XMLReader();
        if ($xmlReader->open($pathAndFilename, null, LIBXML_PARSEHUGE) === false) {
            throw new NeosException(sprintf('Error: XMLReader could not open "%s".', $pathAndFilename), 1540934199);
        }

        if ($this->workspaceRepository->findOneByName('live') === null) {
            $this->workspaceRepository->add(new Workspace('live'));
            $this->persistenceManager->persistAll();
        }

        while ($xmlReader->read()) {
            if ($xmlReader->nodeType != \XMLReader::ELEMENT || $xmlReader->name !== 'site') {
                continue;
            }

            $site = $this->getSiteByNodeName($xmlReader->getAttribute('siteNodeName'));
            $site->setName($xmlReader->getAttribute('name'));
            $site->setState((integer)$xmlReader->getAttribute('state'));

            $siteResourcesPackageKey = $xmlReader->getAttribute('siteResourcesPackageKey');
            if (!$this->packageManager->isPackageAvailable($siteResourcesPackageKey)) {
                throw new UnknownPackageException(sprintf('Package "%s" specified in the XML as site resources package does not exist.', $siteResourcesPackageKey), 1303891443);
            }
            if (!$this->packageManager->isPackageAvailable($siteResourcesPackageKey)) {
                throw new InvalidPackageStateException(sprintf('Package "%s" specified in the XML as site resources package is not active.', $siteResourcesPackageKey), 1303898135);
            }
            $site->setSiteResourcesPackageKey($siteResourcesPackageKey);

            $rootNode = $this->contextFactory->create()->getRootNode();
            // We fetch the workspace to be sure it's known to the persistence manager and persist all
            // so the workspace and site node are persisted before we import any nodes to it.
            $rootNode->getContext()->getWorkspace();
            $this->persistenceManager->persistAll();

            $sitesNode = $rootNode->getNode(SiteService::SITES_ROOT_PATH);
            if ($sitesNode === null) {
                $sitesNode = $rootNode->createNode(NodePaths::getNodeNameFromPath(SiteService::SITES_ROOT_PATH));
            }

            $this->nodeImportService->import($xmlReader, $sitesNode->getPath(), dirname($pathAndFilename) . '/Resources');
        }

        if ($site === null) {
            throw new NeosException(sprintf('The XML file did not contain a valid site node.'), 1418999522);
        }
        $this->emitSiteImported($site);
        return $site;
    }
861066
public function deleteFile($filename)
    {
        if (isset($this->_fileHandlers[$filename])) {
            $this->_fileHandlers[$filename]->close();
        }
        unset($this->_fileHandlers[$filename]);

        global $php_errormsg;
        $trackErrors = ini_get('track_errors'); ini_set('track_errors', '1');
        if (!@unlink($this->_dirPath . '/' . $filename)) {
            ini_set('track_errors', $trackErrors);
            include_once 'Zend/Search/Lucene/Exception.php';
            throw new Zend_Search_Lucene_Exception('Can\'t delete file: ' . $php_errormsg);
        }
        ini_set('track_errors', $trackErrors);
    }
309483
public function onFileChanged($path)
    {
        if (!Daemon::lintFile($path)) {
            Daemon::log(__METHOD__ . ': Detected parse error in ' . $path);
            return;
        }
        foreach ($this->files[$path] as $cb) {
            if (is_callable($cb) || is_array($cb)) {
                $cb($path);
            } elseif (!Daemon::$process->IPCManager->importFile($cb, $path)) {
                $this->rmWatch($path, $cb);
            }
        }
    }
1025095
private function actionDelete()
    {
        $baseName = substr($this->path, 0, strrpos($this->path, '.'));
        $files = glob($baseName . '.*');
        if (!is_array($files))
        {
            $files = array();
        }
        $files2 = glob($baseName . '-*');
        if (!is_array($files2))
        {
            $files2 = array();
        }

        $files = array_merge($files, $files2);

        foreach ($files as $file)
        {
            @unlink($file);
        }
    }
492957
public function delete()
    {
        if ($this->beforeDelete()) {
            if (!Yii::$app->storage->fileSystemDeleteFile($this->name_new_compound)) {
                Logger::error("Unable to remove file from filesystem: " . $this->name_new_compound);
            }
            
            $this->updateAttributes(['is_deleted' => true]);
            
            $this->afterDelete();
            return true;
        }
    }
722091
public function setToBeDeleted()
    {
        $this->instance->markAttachmentUpdated();

        if ( ! $this->config->keepOldFiles()) {
            $this->clear();
        }

        $this->clearAttributes();
    }