|
@@ 226-231 (lines=6) @@
|
| 223 |
|
* @throws \Icewind\SMB\Exception\NotFoundException |
| 224 |
|
* @throws \Icewind\SMB\Exception\AlreadyExistsException |
| 225 |
|
*/ |
| 226 |
|
public function rename($from, $to) { |
| 227 |
|
$path1 = $this->escapePath($from); |
| 228 |
|
$path2 = $this->escapePath($to); |
| 229 |
|
$output = $this->execute('rename ' . $path1 . ' ' . $path2); |
| 230 |
|
return $this->parseOutput($output, $to); |
| 231 |
|
} |
| 232 |
|
|
| 233 |
|
/** |
| 234 |
|
* Upload a local file |
|
@@ 243-248 (lines=6) @@
|
| 240 |
|
* @throws \Icewind\SMB\Exception\NotFoundException |
| 241 |
|
* @throws \Icewind\SMB\Exception\InvalidTypeException |
| 242 |
|
*/ |
| 243 |
|
public function put($source, $target) { |
| 244 |
|
$path1 = $this->escapeLocalPath($source); //first path is local, needs different escaping |
| 245 |
|
$path2 = $this->escapePath($target); |
| 246 |
|
$output = $this->execute('put ' . $path1 . ' ' . $path2); |
| 247 |
|
return $this->parseOutput($output, $target); |
| 248 |
|
} |
| 249 |
|
|
| 250 |
|
/** |
| 251 |
|
* Download a remote file |
|
@@ 260-265 (lines=6) @@
|
| 257 |
|
* @throws \Icewind\SMB\Exception\NotFoundException |
| 258 |
|
* @throws \Icewind\SMB\Exception\InvalidTypeException |
| 259 |
|
*/ |
| 260 |
|
public function get($source, $target) { |
| 261 |
|
$path1 = $this->escapePath($source); |
| 262 |
|
$path2 = $this->escapeLocalPath($target); //second path is local, needs different escaping |
| 263 |
|
$output = $this->execute('get ' . $path1 . ' ' . $path2); |
| 264 |
|
return $this->parseOutput($output, $source); |
| 265 |
|
} |
| 266 |
|
|
| 267 |
|
/** |
| 268 |
|
* Open a readable stream to a remote file |