Copy a file or folder to remote host. :param local_path: Path to local file or dir. Must be shlex quoted. :type local_path: ``str`` :param remote_path: Path to remote file or dir. Must be shlex quoted. :type remote_path: ``str`` :param mode: Option
(self, local_path, remote_path, mode=None, mirror_local_mode=False)
| 154 | return results |
| 155 | |
| 156 | def put(self, local_path, remote_path, mode=None, mirror_local_mode=False): |
| 157 | """ |
| 158 | Copy a file or folder to remote host. |
| 159 | |
| 160 | :param local_path: Path to local file or dir. Must be shlex quoted. |
| 161 | :type local_path: ``str`` |
| 162 | |
| 163 | :param remote_path: Path to remote file or dir. Must be shlex quoted. |
| 164 | :type remote_path: ``str`` |
| 165 | |
| 166 | :param mode: Optional mode to use for the file or dir. |
| 167 | :type mode: ``int`` |
| 168 | |
| 169 | :param mirror_local_mode: Optional Flag to mirror the mode |
| 170 | on local file/dir on remote host. |
| 171 | :type mirror_local_mode: ``boolean`` |
| 172 | |
| 173 | :rtype: ``dict`` of ``str`` to ``dict`` |
| 174 | """ |
| 175 | |
| 176 | if not os.path.exists(local_path): |
| 177 | raise Exception("Local path %s does not exist." % local_path) |
| 178 | |
| 179 | options = { |
| 180 | "local_path": local_path, |
| 181 | "remote_path": remote_path, |
| 182 | "mode": mode, |
| 183 | "mirror_local_mode": mirror_local_mode, |
| 184 | } |
| 185 | |
| 186 | return self._execute_in_pool(self._put_files, **options) |
| 187 | |
| 188 | def mkdir(self, path): |
| 189 | """ |