Differential D19766 Diff 47217 src/applications/drydock/interface/filesystem/DrydockSFTPFilesystemInterface.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/drydock/interface/filesystem/DrydockSFTPFilesystemInterface.php
Show All 40 Lines | public function readFile($path) { | ||||
$future = $this->getExecFuture($path); | $future = $this->getExecFuture($path); | ||||
$future->write(csprintf('get %s %s', $path, $target)); | $future->write(csprintf('get %s %s', $path, $target)); | ||||
$future->resolvex(); | $future->resolvex(); | ||||
return Filesystem::readFile($target); | return Filesystem::readFile($target); | ||||
} | } | ||||
public function saveFile($path, $name) { | public function saveFile($path, $name) { | ||||
$data = $this->readFile($path); | $data = $this->readFile($path); | ||||
// TODO | |||||
Lint: TODO Comment: This comment has a TODO. | |||||
$file = PhabricatorFile::newFromFileData( | $file = PhabricatorFile::newFromFileData( | ||||
$data, | $data, | ||||
array('name' => $name)); | array('name' => $name)); | ||||
$file->setName($name); | $file->setName($name); | ||||
$file->save(); | $file->save(); | ||||
return $file; | return $file; | ||||
} | } | ||||
Show All 9 Lines |
This comment has a TODO.