Function Hook_task_import_ftp_downloads->ftp_recursive_downloads_scan

Definitions

sources/hooks/systems/tasks/import_ftp_downloads.php

  • Worker function to do an FTP import.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$conn_id resource No No required parameter N/A N/A The FTP connection
$url URLPATH No No required parameter N/A N/A The URL that is equivalent to the base path on our FTP
$directory PATH No No required parameter N/A N/A The directory we are scanning
$dest_cat AUTO_LINK No No required parameter N/A N/A The destination downloading category
$make_subfolders boolean No No required parameter N/A N/A Whether we add hierarchically (as opposed to a flat category fill)

Returns

  • Number of downloads added
  • Type: integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Worker function to do an FTP import.
 *
 * @param  resource $conn_id The FTP connection
 * @param  URLPATH $url The URL that is equivalent to the base path on our FTP
 * @param  PATH $directory The directory we are scanning
 * @param  AUTO_LINK $dest_cat The destination downloading category
 * @param  boolean $make_subfolders Whether we add hierarchically (as opposed to a flat category fill)
 * @return integer Number of downloads added
 */

protected function ftp_recursive_downloads_scan($conn_id, string $url, string $directory, int $dest_cat, bool $make_subfolders) : int