file/update_file

        http://www.mediafire.com/developers/core_api/1.3/file/#update_file
422512
def file_update_file(self, quick_key, file_extension=None, filename=None,
                         description=None, mtime=None, privacy=None,
                         timezone=None):
        
        return self.request('file/update', QueryParams({
            'quick_key': quick_key,
            'file_extension': file_extension,
            'filename': filename,
            'description': description,
            'mtime': mtime,
            'privacy': privacy,
            'timezone': timezone
        }))
992632
function updateListItem(itemMetadata, customFileMetadata) {
            // Define the list item changes. Use the FileLeafRef property to change the display name. 
            // Assemble the file update metadata 
            var metadata = {
                __metadata: {
                    type: itemMetadata.type
                },
                FileLeafRef: fileuniquename,
                Title: filedisplayname
            };

            // Add the custom metadata fields for this file to the metadata object
            if (typeof(customFileMetadata) === "object") $(metadata).extend(metadata, customFileMetadata);
            
            // Send the request and return the promise.
            // This call does not return response content from the server.
            var body = JSON.stringify(metadata);
            return $http.post(itemMetadata.uri, body, {
                headers: {
                    "X-RequestDigest": $("#__REQUESTDIGEST").val(),
                    "content-type": "application/json;odata=verbose",
                    "content-length": body.length,
                    "IF-MATCH": "*",
                    "X-HTTP-Method": "MERGE"
                }
            });
        }
246927
function updateTernFile(document) {
            var path  = document.file.fullPath;

            _postMessageByPass({
                type       : MessageIds.TERN_UPDATE_FILE_MSG,
                path       : path,
                text       : getTextFromDocument(document)
            });

            return addPendingRequest(path, OFFSET_ZERO, MessageIds.TERN_UPDATE_FILE_MSG);
        }
820410
def Upload(self,directory,filename):
        """"""
        if self._isMediaFile(filename):
            return self._upload_media(directory,filename)
        elif self._isConfigFile(filename):
            return self._update_config(directory,filename)

        print "Not handled!"
        return False
1101880
def update_article(self, media_id, index, article):
        
        article_data = {
            'thumb_media_id': article['thumb_media_id'],
            'title': article['title'],
            'content': article['content'],
            'author': article.get('author', ''),
            'content_source_url': article.get('content_source_url', ''),
            'digest': article.get('digest', ''),
            'show_cover_pic': article.get('show_cover_pic', 0)
        }
        return self._post(
            'material/update_news',
            data={
                'media_id': media_id,
                'index': index,
                'articles': article_data
            }
        )
461377
def update_hash(src_file):
    
    hash_file = local.path(src_file) + ".hash"
    new_hash = 0
    with open(hash_file, 'w') as h_file:
        new_hash = get_hash_of_dirs(src_file)
        h_file.write(str(new_hash))
    return new_hash
185642
def update_version_file(version)
      if File.exists?('VERSION')
        File.open('VERSION', 'w') { |f| f << version.to_s }
        modified_files << 'VERSION'
      end
    end
1321630
private function updateFile()
    {
        if (is_null($this->file_path)) {
            throw new StorageException('Invalid file path');
        }

        file_put_contents(
            $this->file_path,
            serialize(
                [
                    'tokens' => $this->tokens,
                    'states' => $this->states
                ]
            )
        );
    }
606687
def media_update(self, id, description=None, focus=None):
        
        id = self.__unpack_id(id)

        if focus != None:
            focus = str(focus[0]) + "," + str(focus[1])
            
        params = self.__generate_params(locals(), ['id'])  
        return self.__api_request('PUT', '/api/v1/media/{0}'.format(str(id)), params)
675359
def update():
    '''
    
    '''
    try:
        salt.fileserver.reap_fileserver_cache_dir(
            os.path.join(__opts__['cachedir'], 'minionfs/hash'),
            find_file)
    except os.error:
        # Hash file won't exist if no files have yet been served up
        pass
985689
def _update_meta(self,directory,filename):
        """"""

        if not self._connectToFlickr():
            print("%s - Couldn't connect to flickr"%(directory))
            return False

        db = self._loadDB(directory)

        # Look up photo id for this photo
        pid=db[filename]['photoid']

        # =========== LOAD TITLE ========
        fullfile=os.path.join(directory,filename+'.title')
        try:
            logger.debug('trying to open [%s]'%(fullfile))
            _title=(open(fullfile).readline().strip())
            logger.debug("_updatemeta: %s - title is %s",filename,_title)
        except:
            _title=''

        # =========== LOAD DESCRIPTION ========
        fullfile=os.path.join(directory,filename+'.description')
        try:
            _description=(open(fullfile).readline().strip())
            logger.debug("_updatemeta: %s - description is %s",filename,_description)
        except:
            _description=''

        logger.info('%s - updating metadata (title=%s) (description=%s)'\
                %(filename,_title,_description))
        resp=self.flickr.photos_setMeta(photo_id=pid,title=_title,\
                description=_description)
        if resp.attrib['stat']!='ok':
            logger.error("%s - flickr: photos_setTags failed with status: %s",\
                    resp.attrib['stat']);
            return False
        else:
            return True
940494
def file_needs_update?(filename: nil)
      # looking for something like: FastlaneRunnerAPIVersion [0.9.1]
      regex_to_use = API_VERSION_REGEX

      source = File.join(self.source_swift_code_file_folder_path, "/#{filename}")
      target = File.join(self.target_swift_code_file_folder_path, "/#{filename}")

      # target doesn't have the file yet, so ya, I'd say it needs to be updated
      return true unless File.exist?(target)

      source_file_content = File.read(source)
      target_file_content = File.read(target)

      bundled_version = source_file_content.match(regex_to_use)[1]
      target_version = target_file_content.match(regex_to_use)[1]
      file_versions_are_different = bundled_version != target_version

      UI.verbose("#{filename} FastlaneRunnerAPIVersion (bundled/target): #{bundled_version}/#{target_version}")
      files_are_different = source_file_content != target_file_content

      if files_are_different && !file_versions_are_different
        UI.verbose("File versions are the same, but the two files are not equal, so that's a problem, setting needs update to 'true'")
      end

      needs_update = file_versions_are_different || files_are_different

      return needs_update
    end
1356766
protected function fileUpdate()
    {
        foreach ($this->getAsserts() as $field => $asserts) {
            if ($this->$field instanceof UploadedFile) {
                $tempField = '_'.$field;
                $tempFile = $this->getFilePath($tempField, true);
                is_file($tempFile) && unlink($tempFile);
                $this->bean->removeProperty($tempField);

                $this->$field = $this->moveFile($this->$field);
            }
        }
    }
782734
def do_file_update_metadata(client, args):
    """"""
    client.update_file_metadata(args.uri, filename=args.filename,
                                description=args.description, mtime=args.mtime,
                                privacy=args.privacy)
    return True
110750
def update_file(self, path):
        '''
        
        '''
        try:
            # grab the file
            result, stat = self.zoo_client.get(path, watch=self.watch_file)
        except ZookeeperError:
            self.set_valid(False)
            self.call_error(self.INVALID_GET)
            return False

        if self.pointer:
            if result is not None and len(result) > 0:
                self.pointed_at_expired = False
                # file is a pointer, go update and watch other file
                self.point_path = result
                if self.compare_pointer(result):
                    self.update_pointed()
            else:
                self.pointed_at_expired = True
                self.old_pointed = ''
                self.old_data = ''
                self.set_valid(False)
                self.call_error(self.INVALID_PATH)
        else:
            # file is not a pointer, return contents
            if self.compare_data(result):
                self.call_config(result)
            self.set_valid(True)

        return True
244370
private void updateList(final File filename) {
        try {
            final URI reletivePath = toURI(filename.getAbsolutePath().substring(new File(normalize(tempDir.toString())).getPath().length() + 1));
            final FileInfo f = job.getOrCreateFileInfo(reletivePath);
            if (hasConref) {
                f.hasConref = true;
            }
            if (hasKeyref) {
                f.hasKeyref = true;
            }
            job.write();
        } catch (final RuntimeException e) {
            throw e;
        } catch (final Exception e) {
            logger.error(e.getMessage(), e) ;
        }
    }
474500
def copy_file_if_needed!(filename: nil, dry_run: false)
      needs_update = file_needs_update?(filename: filename)
      UI.verbose("file #{filename} needs an update") if needs_update

      # Ok, we know if this file needs an update, can return now if it's a dry run
      return needs_update if dry_run

      unless needs_update
        # no work needed, just return
        return false
      end

      source = File.join(self.source_swift_code_file_folder_path, "/#{filename}")
      target = File.join(self.target_swift_code_file_folder_path, "/#{filename}")

      FileUtils.cp(source, target)
      UI.verbose("Copied #{source} to #{target}")
      return true
    end