Updates the mode/owner/group for the remote file at the given
    location.
513903
def file_attribs(location, mode=None, owner=None, group=None, sudo=False):
    """"""
    return dir_attribs(location, mode, owner, group, False, sudo)
813715
def update(self, of):
        """"""

        # The other values should be set when the file object is created with dataset.bsfile()
        for p in ('mime_type', 'preference', 'state', 'hash', 'modified', 'size', 'contents', 'source_hash', 'data'):
            setattr(self, p, getattr(of, p))

        return self
38735
public void changeGroup(String group, String file)
        throws IOException, ServerException {
        String arguments = group + " " + file;
        Command cmd = new Command("SITE CHGRP", arguments);
        try {
            controlChannel.execute(cmd);
        } catch (UnexpectedReplyCodeException urce) {
            throw ServerException.embedUnexpectedReplyCodeException(urce);
        } catch (FTPReplyParseException rpe) {
            throw ServerException.embedFTPReplyParseException(rpe);
        }
    }
290563
private static void inheritOwnerAndGroupIfEmpty(MutableInode<?> newInode,
      InodeDirectoryView ancestorInode) {
    if (ServerConfiguration.getBoolean(PropertyKey.MASTER_METASTORE_INODE_INHERIT_OWNER_AND_GROUP)
        && newInode.getOwner().isEmpty() && newInode.getGroup().isEmpty()) {
      // Inherit owner / group if empty
      newInode.setOwner(ancestorInode.getOwner());
      newInode.setGroup(ancestorInode.getGroup());
    }
  }
175988
private function setPlaceHolder($file, &$_data, &$_files)
    {
        //urls to be matched...
        //'/file/resource/media/([^']+)#'
        //'/resource/open/([^/]+)/([^']+)'
        $text = file_get_contents($file);
        $baseUrl = $this->router->getContext()->getBaseUrl();

        //first regex
        $regex = '#' . $baseUrl . '/file/resource/media/([^\'"]+)#';

        preg_match_all($regex, $text, $matches, PREG_SET_ORDER);

        if (count($matches) > 0) {
            foreach ($matches as $match) {

                if (!$this->getItemFromUid($match[1], $_data)) {
                    $this->createDataFolder($_data);
                    $node = $this->resourceManager->getNode($match[1]);

                    if ($node && $node->getResourceType()->getName() === 'file') {
                        $el = $this->getImporterByName('resource_manager')->getResourceElement(
                            $node,
                            $node->getWorkspace(),
                            $_files,
                            $_data,
                            true
                        );
                        $el['item']['parent'] = 'data_folder';
                        $el['item']['roles'] = array(array('role' => array(
                            'name'   => 'ROLE_USER',
                            'rights' => $this->maskManager->decodeMask(7, $this->resourceManager->getResourceTypeByName('file'))
                        )));
                        $_data['data']['items'][] = $el;
                    }
                }

                $text = $this->replaceLink($text, $match[0], $match[1], $_data);
            }
        }

        //second regex
        $regex = '#' . $baseUrl . '/resource/open/([^/]+)/([^\'"]+)#';
        preg_match_all($regex, $text, $matches, PREG_SET_ORDER);

        if (count($matches) > 0) {
            foreach ($matches as $match) {
                $text = $this->replaceLink($text, $match[0], $match[2]);
            }
        }

        $event = $this->eventDispatcher->dispatch('rich_text_format_event_export', 'RichTextFormat', array($text, $_data, $_files));
        $text = $event->getText();

        return $text;
    }
531490
private static void setMode(Resource file, int mode) throws ApplicationException {
	if (mode == -1 || SystemUtil.isWindows()) return;
	try {
	    file.setMode(mode);
	    // FileUtil.setMode(file,mode);
	}
	catch (IOException e) {
	    throw new ApplicationException("can't change mode of file " + file, e.getMessage());
	}
    }
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
647133
def _move_update(sourcepath, destname):
    """"""
    if sys.platform.startswith('linux'):
        return os.system("/bin/mv -fu '%s' '%s'" % (sourcepath, destname))
    else:
        return os.system("rsync -ua --remove-source-files '%s' '%s'" % (sourcepath, destname))
630992
public function chmod($remote_file, $mode)
    {
        $mode = octdec(str_pad($mode, 4, '0', STR_PAD_LEFT));
        $mode = (int) $mode;

        if (!@ftp_chmod($this->connection, $mode, $remote_file) !== false) {
            throw new \Exception("Could not change remote file to mode: " . $mode);
        }

        return true;
    }
432381
def update_location(self, ps):
        """"""

        loc = ps.get('location')
        if not loc:
            loc = os.path.join(self.project().get('location'), self.name())
            ps = ps.add_raw(["<location>" + loc])

        return ps
733227
private void update_from_remote( ) {
    Job remote = DKV.getGet(_key); // Watch for changes in the DKV
    if( this==remote ) return; // Trivial!
    if( null==remote ) return; // Stay with local version
    boolean differ = false;
    if( _stop_requested != remote._stop_requested ) differ = true;
    if(_start_time!= remote._start_time) differ = true;
    if(_end_time  != remote._end_time  ) differ = true;
    if(_ex        != remote._ex        ) differ = true;
    if(_work      != remote._work      ) differ = true;
    if(_worked    != remote._worked    ) differ = true;
    if(_msg       != remote._msg       ) differ = true;
    if(_max_runtime_msecs != remote._max_runtime_msecs) differ = true;
    if(! Arrays.equals(_warns, remote._warns)) differ = true;
    if( differ )
      synchronized(this) { 
        _stop_requested = remote._stop_requested;
        _start_time= remote._start_time;
        _end_time  = remote._end_time  ;
        _ex        = remote._ex        ;
        _work      = remote._work      ;
        _worked    = remote._worked    ;
        _msg       = remote._msg       ;
        _max_runtime_msecs = remote._max_runtime_msecs;
        _warns     = remote._warns;
      }
  }
139629
public function updateOwners()
    {
        foreach ($this->attributes as $attr) {
            Mediafile::removeOwner($this->owner->primaryKey, $this->name, $attr);

            if ($mediafile = $this->loadModel($this->owner->$attr)) {
                $mediafile->addOwner($this->owner->primaryKey, $this->name, $attr);
            }
        }
    }
1166949
def _remote_chmod(self, paths, mode, sudoable=False):
        
        LOG.debug('_remote_chmod(%r, mode=%r, sudoable=%r)',
                  paths, mode, sudoable)
        return self.fake_shell(lambda: mitogen.select.Select.all(
            self._connection.get_chain().call_async(
                ansible_mitogen.target.set_file_mode, path, mode
            )
            for path in paths
        ))
393301
public void updateGroupList() {

        Map<?, ?> objects = (Map<?, ?>)getSettings().getListObject();
        if (objects != null) {
            objects.remove(CmsGroupsList.class.getName());
            objects.remove(A_CmsUsersList.class.getName());
        }
    }
9056
def update_instances
      instance_group_updater = InstanceGroupUpdater.new(
        ip_provider: @deployment_planner.ip_provider,
        instance_group: @instance_group,
        disk_manager: @disk_manager,
        template_blob_cache: @template_blob_cache,
        dns_encoder: @dns_encoder,
        link_provider_intents: @deployment_planner.link_provider_intents,
      )
      instance_group_updater.update
    end
516757
def update_mode(arg_namespace):
    """"""
    try:
        updater.update(custom_sources=arg_namespace.custom)
    except (PermissionError, FileNotFoundError) as exception:
        if isinstance(exception, PermissionError):
            print('No write permission for current working directory.')
        if isinstance(exception, FileNotFoundError):
            print('Necessary resources for updating not found in current '
                  'working directory.')
1112157
def groups_add_owner(self, room_id, user_id, **kwargs):
        """"""
        return self.__call_api_post('groups.addOwner', roomId=room_id, userId=user_id, kwargs=kwargs)