Example #1
0
 /**
  * Ensures that a given directory is world readable.
  *
  * @param \Drupal\Core\FileTransfer\FileTransfer $filetransfer
  *   Object which is a child of FileTransfer.
  * @param string $path
  *   The file path to make world readable.
  * @param bool $recursive
  *   If the chmod should be applied recursively.
  */
 public function makeWorldReadable(&$filetransfer, $path, $recursive = TRUE)
 {
     if (!is_executable($path)) {
         // Set it to read + execute.
         $new_perms = substr(sprintf('%o', fileperms($path)), -4, -1) . "5";
         $filetransfer->chmod($path, intval($new_perms, 8), $recursive);
     }
 }
 function __construct($jail, $username, $password, $hostname = 'localhost', $port = 9999)
 {
     parent::__construct($jail, $username, $password, $hostname, $port);
 }