|
@@ 256-261 (lines=6) @@
|
| 253 |
|
* @throws \Icewind\SMB\Exception\NotFoundException |
| 254 |
|
* @throws \Icewind\SMB\Exception\AlreadyExistsException |
| 255 |
|
*/ |
| 256 |
|
public function rename($from, $to) { |
| 257 |
|
$path1 = $this->escapePath($from); |
| 258 |
|
$path2 = $this->escapePath($to); |
| 259 |
|
$output = $this->execute('rename ' . $path1 . ' ' . $path2); |
| 260 |
|
return $this->parseOutput($output, $to); |
| 261 |
|
} |
| 262 |
|
|
| 263 |
|
/** |
| 264 |
|
* Upload a local file |
|
@@ 273-278 (lines=6) @@
|
| 270 |
|
* @throws \Icewind\SMB\Exception\NotFoundException |
| 271 |
|
* @throws \Icewind\SMB\Exception\InvalidTypeException |
| 272 |
|
*/ |
| 273 |
|
public function put($source, $target) { |
| 274 |
|
$path1 = $this->escapeLocalPath($source); //first path is local, needs different escaping |
| 275 |
|
$path2 = $this->escapePath($target); |
| 276 |
|
$output = $this->execute('put ' . $path1 . ' ' . $path2); |
| 277 |
|
return $this->parseOutput($output, $target); |
| 278 |
|
} |
| 279 |
|
|
| 280 |
|
/** |
| 281 |
|
* Download a remote file |
|
@@ 290-295 (lines=6) @@
|
| 287 |
|
* @throws \Icewind\SMB\Exception\NotFoundException |
| 288 |
|
* @throws \Icewind\SMB\Exception\InvalidTypeException |
| 289 |
|
*/ |
| 290 |
|
public function get($source, $target) { |
| 291 |
|
$path1 = $this->escapePath($source); |
| 292 |
|
$path2 = $this->escapeLocalPath($target); //second path is local, needs different escaping |
| 293 |
|
$output = $this->execute('get ' . $path1 . ' ' . $path2); |
| 294 |
|
return $this->parseOutput($output, $source); |
| 295 |
|
} |
| 296 |
|
|
| 297 |
|
/** |
| 298 |
|
* Open a readable stream to a remote file |