Update a FS task
@param models\FileSystem\FsTask $FsTask
@return bool
@deprecated use v4 service
188443
public function updateTask( models\FileSystem\FsTask $FsTask){
        $rest = $this->getService( self::API_FS_TASK . $FsTask->getId());
        $rest->PUT( $FsTask);

        return $rest->getSuccess();
    }
1161859
private function updateStacks()
    {
        $cloudFormation = $this->getService();

        try {
            $this->log('Update stacks...');
            $cloudFormation->updateStack($this->stackProperties());
        } catch (CloudFormationException $e) {
            if (1 === preg_match('/No updates are to be performed/i', $e->getMessage())) {
                $this->log('No updates are to be performed.');
                return;
            }

            throw new \BuildException("AwsErrorCode [{$e->getAwsErrorCode()}] Message : " . $e->getMessage());
        }
    }
1230316
protected void updateLastScanFile() {
        final String methodName = "updateLastScanFile()";
        final File f = new File(lastScanFileName);
        final CacheOnDisk cod = this;
        traceDebug(methodName, "cacheName=" + this.cacheName);
        AccessController.doPrivileged(new PrivilegedAction() {
            @Override
            public Object run() {
                FileOutputStream fos = null;
                ObjectOutputStream oos = null;
                try {
                    fos = new FileOutputStream(f);
                    oos = new ObjectOutputStream(fos);
                    oos.writeLong(System.currentTimeMillis());
                } catch (Throwable t) {
                    com.ibm.ws.ffdc.FFDCFilter.processException(t, "com.ibm.ws.cache.CacheOnDisk.updateLastScanFile", "650", cod);
                    traceDebug(methodName, "cacheName=" + cod.cacheName + "\nException: " + ExceptionUtility.getStackTrace(t));
                } finally {
                    try {
                        if (oos != null) {
                            oos.close();
                        }
                        if (fos != null) {
                            fos.close();
                        }
                    } catch (Throwable t) {
                        com.ibm.ws.ffdc.FFDCFilter.processException(t, "com.ibm.ws.cache.CacheOnDisk.updateLastScanFile", "661", cod);
                        traceDebug(methodName, "cacheName=" + cod.cacheName + "\nException: " + ExceptionUtility.getStackTrace(t));
                    }
                }
                return null;
            }
        });
    }
1215017
public function update(Request $request, $key)
    {
        $this->getFormRequestInstance();

        $model = $this->findFirstByKey($key);

        if (!$model) {
            return $this->validNotFoundJsonResponse();
        }

        DB::beginTransaction();
       
        try { 
            $instance = $this->repository->update($model, $request->all());
            $model = $instance[1];
            $mergedRequest = $this->uploadFiles($request, $model);
            $this->updateOrCreateRelations($mergedRequest, $model);
        } catch (\Exception $e) {
            DB::rollback();

            $message = $this->updateFailedMessage($key, $e->getMessage());
            throw new ResourceControllerException($message);
        }

        DB::commit();

        $message = $this->updateSuccessfulMessage($key);
        $data = [$model];

        return $this->validSuccessJsonResponse($message, $data);
    }
621666
public function update(FaqRequest $request, Faq $faq)
    {
        try {
            $attributes = $request->all();

            $faq->update($attributes);
            return $this->response->message(trans('messages.success.updated', ['Module' => trans('faq::faq.name')]))
                ->code(204)
                ->status('success')
                ->url(guard_url('faq/faq/' . $faq->getRouteKey()))
                ->redirect();
        } catch (Exception $e) {
            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('faq/faq/' . $faq->getRouteKey()))
                ->redirect();
        }

    }
551386
public function update(AccountSettingsRequest $request)
    {
        $data = $request->validated();
        $currentUser = $request->user($this->getGuard());

        ! $request->hasFile('profile_picture')
        || $currentUser->addMediaFromRequest('profile_picture')
                       ->sanitizingFileName(function ($fileName) {
                           return md5($fileName).'.'.pathinfo($fileName, PATHINFO_EXTENSION);
                       })
                       ->toMediaCollection('profile_picture', config('cortex.auth.media.disk'));

        ! $request->hasFile('cover_photo')
        || $currentUser->addMediaFromRequest('cover_photo')
                       ->sanitizingFileName(function ($fileName) {
                           return md5($fileName).'.'.pathinfo($fileName, PATHINFO_EXTENSION);
                       })
                       ->toMediaCollection('cover_photo', config('cortex.auth.media.disk'));

        // Update profile
        $currentUser->fill($data)->save();

        return intend([
            'back' => true,
            'with' => ['success' => trans('cortex/auth::messages.account.updated_account')]
                      + (isset($data['two_factor']) ? ['warning' => trans('cortex/auth::messages.verification.twofactor.phone.auto_disabled')] : []),
        ]);
    }
703612
private function update()
    {
        Eresus_Kernel::log(__METHOD__, LOG_DEBUG, '()');

        $settings = "<?php\n";

        $settings .= $this->mkstr('siteName', 'string');
        $settings .= $this->mkstr('siteTitle', 'string');
        $settings .= $this->mkstr('siteTitleReverse', 'bool');
        $settings .= $this->mkstr('siteTitleDivider', 'string');
        $settings .= $this->mkstr('siteKeywords', 'string', array('nobr'=>true));
        $settings .= $this->mkstr('siteDescription', 'string', array('nobr'=>true));
        $settings .= $this->mkstr('mailFromAddr', 'string');
        $settings .= $this->mkstr('mailFromName', 'string');
        $settings .= $this->mkstr('mailFromOrg', 'string');
        $settings .= $this->mkstr('mailReplyTo', 'string');
        $settings .= $this->mkstr('mailFromSign', 'string', array('savebr'=>true));
        $settings .= $this->mkstr('filesModeSetOnUpload', 'bool');
        $settings .= $this->mkstr('filesModeDefault', 'string');
        $settings .= $this->mkstr('filesTranslitNames', 'bool');
        $settings .= $this->mkstr('contentTypeDefault', 'string');
        $settings .= $this->mkstr('pageTemplateDefault', 'string');

        $legacyKernel = Eresus_Kernel::app()->getLegacyKernel();
        file_put_contents($legacyKernel->froot . 'cfg/settings.php', $settings);
        HTTP::goback();
    }
422981
public function setTaskStatus(AbstractTask $task, $status) {
        Database::prepare(
            'UPDATE `##maj_admintasks`'.
            ' SET majat_status = :status'.
            ' WHERE majat_name = :name'
        )->execute(array(
                'name' => $task->getName(),
				'status' => $status ? 'enabled' : 'disabled'
        ));
    }
1357160
private function updateDistBundles()
    {
        $fs = $this->app['filesystem']->getFilesystem('root');
        $files = [
            '.bolt.yml',
            'composer.json',
            'composer.lock',
            'src/Site/CustomisationExtension.php',
        ];
        foreach ($files as $file) {
            $dist = $fs->getFile($file . '.dist');
            if (!$fs->has($file) && $dist->exists()) {
                $dist->rename($file);
            }
        }
    }
1136221
public function update()
    {
        // copy the code into memory
        $backup = file($this->reflection->getFileName());

        list($preamble, $class) = $this->splitClassFile($backup);
        $preamble = $this->stripOutExistingDocBlock($preamble);
        $preamble .= $this->buildUpdatedDocBlock();

        if ($this->writeClassFile(implode(PHP_EOL, [$preamble, $class]))
            && $this->commandLineLint($this->reflection->getFileName())
        ) {
            return true;
        }

        $this->writeClassFile(implode('', $backup));
        return false;
    }
1054712
public function addTask(Task $task): Task
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 0.8. Use create() instead.', __METHOD__), E_USER_DEPRECATED);

        return $this->create($task);
    }
1157559
public function updateTask(Task $task): Task
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 0.8. Use update() instead.', __METHOD__), E_USER_DEPRECATED);

        return $this->update($task);
    }
1039174
public function update(FileRequest $request, File $file)
    {
        $file->update($request->all());
        
        return $this->makeRedirect(true, 'admin.files.index', __('msg.update'));
    }
147727
public function update(Task $task): Task
    {
        $id = $task->getId();

        $task->setId(null);

        $response = $this->client->put($this->prepareUrlForKey('update-task', ['id' => $id]), [], $task->jsonSerialize());
        $responseData = $response->getDecodedBody();

        return new Task($responseData);
    }
1224276
def update_fw(self, nids, fw_type, fw_ver, fw_path=None):
        """"""
        fw_bin = None
        if fw_path:
            fw_bin = load_fw(fw_path)
            if not fw_bin:
                return
        self.ota.make_update(nids, fw_type, fw_ver, fw_bin)
680337
static private function update_file_or_buffer($chunk, $fp, &$buffer) {
        if ($fp) {
            fwrite($fp, $chunk);
        } else {
            $buffer .= $chunk;
        }
    }
197052
public function update(UpdateFriendRequest $request)
    {
        $request->setIdentifier($this->identifier);
        $response = new UpdateFriendResponse();
        return $this->client->sendRequest($request, $response);
    }