Ejemplo n.º 1
0
 public function addTorrentFromFile($path)
 {
     $oldFile = realpath($path);
     $newFile = FileUtils::encodeFilename($oldFile);
     rename($oldFile, $newFile);
     $result = $this->service->call('addTorrentFromFile', ['file' => $newFile]);
     unlink($newFile);
     return $result;
 }