public function copyFile($source, $target = null)
{
$data = $this->__preparedRequest('file_copy', 'POST', array(), array('source' => $source, 'target' => $target));
if (array_key_exists('result', (array) $data) == true) {
if ($data->type == 'file') {
return new File((string) $data->result->uuid, $this);
} else {
return (string) $data->result;
}
} else {
return (string) $data->detail;
}
}