You are here

public function FileSync::deleteFile in Tome 8

Deletes an exported file by name.

Parameters

string $filename: The file name.

Overrides FileSyncInterface::deleteFile

File

modules/tome_sync/src/FileSync.php, line 99

Class

FileSync
Handles file import and exports by keeping a file export directory in sync.

Namespace

Drupal\tome_sync

Code

public function deleteFile($filename) {
  $path = $this
    ->joinPaths($this
    ->getFileDirectory(), $filename);
  if (file_exists($path)) {
    $this->fileSystem
      ->delete($path);
  }
}