You are here

interface FileSyncInterface in Tome 8

Abstractly handles file import and exports.

Hierarchy

Expanded class hierarchy of FileSyncInterface

All classes that implement FileSyncInterface

1 file declares its use of FileSyncInterface
CleanFilesCommand.php in modules/tome_sync/src/Commands/CleanFilesCommand.php

File

modules/tome_sync/src/FileSyncInterface.php, line 10

Namespace

Drupal\tome_sync
View source
interface FileSyncInterface {

  /**
   * Imports all files from the file directory.
   */
  public function importFiles();

  /**
   * Deletes the file export directory.
   *
   * @return bool
   *   Whether or not the deletion was successful.
   */
  public function deleteExportDirectory();

  /**
   * Exports a file to the export directory.
   *
   * @param \Drupal\file\FileInterface $file
   *   The file entity.
   */
  public function exportFile(FileInterface $file);

  /**
   * Deletes an exported file by entity.
   *
   * @param \Drupal\file\FileInterface $file
   *   The file entity.
   */
  public function deleteFileExport(FileInterface $file);

  /**
   * Deletes an exported file by name.
   *
   * @param string $filename
   *   The file name.
   */
  public function deleteFile($filename);

}

Members

Namesort descending Modifiers Type Description Overrides
FileSyncInterface::deleteExportDirectory public function Deletes the file export directory. 2
FileSyncInterface::deleteFile public function Deletes an exported file by name. 2
FileSyncInterface::deleteFileExport public function Deletes an exported file by entity. 2
FileSyncInterface::exportFile public function Exports a file to the export directory. 2
FileSyncInterface::importFiles public function Imports all files from the file directory. 2