Example #1
0
 /**
  * Creates a new Message object with a file.
  * @param \System\IO\File The file to send in the message
  * @param string The target filename. This is a fullpath
  * @param string The host. This can be local or remote, or an IPv4
  * @param int The port to use
  * @param string The username to connect to the local SSH server
  * @param string The password to connect to the local SSH server
  */
 public function __construct_6(\System\IO\File $file, $targetFilename, $host, $port, $username, $password)
 {
     $this->setType(\System\System\Interaction\MessageType::TYPE_SYSTEM);
     $this->setMessage('file');
     $contents = @base64_encode($file->getContents());
     $this->setParams(array('file' => $contents, 'atime' => $file->getLastAccessTime(), 'mtime' => $file->getModifiedTime(), 'host' => $host, 'port' => $port, 'username' => $username, 'password' => $password, 'target' => $targetFilename));
 }