Remove usage rights.

        Removes copyright and license information associated with one or more files
191316
def remove_usage_rights_users(self, user_id, file_ids, folder_ids=None):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - user_id
        """ID"""
        path["user_id"] = user_id

        # REQUIRED - file_ids
        """List of ids of files to remove associated usage rights from."""
        params["file_ids"] = file_ids

        # OPTIONAL - folder_ids
        """List of ids of folders. Usage rights will be removed from all files in these folders."""
        if folder_ids is not None:
            params["folder_ids"] = folder_ids

        self.logger.debug("DELETE /api/v1/users/{user_id}/usage_rights with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("DELETE", "/api/v1/users/{user_id}/usage_rights".format(**path), data=data, params=params, no_data=True)
703103
def clear(self):
        '''
        
        '''
        if os.path.exists(self.path):
            os.remove(self.path)
330997
def clear_license(self):
        
        if (self.get_license_metadata().is_read_only() or
                self.get_license_metadata().is_required()):
            raise errors.NoAccess()
        self._my_map['license'] = dict(self._license_default)
753518
public function remove()
    {

        $origin = $destination = \Devil::getPathOf($this->config['dest']);
        if (isset($this->config['onload'])) {
            $destination .= '/origin';
        }
        $realFileName = $destination . '/' . $this->_primaryKey . '_' . $this->existing;
        if (file_exists($realFileName)) unlink($realFileName);

        if (isset($this->config['onload'])) foreach ($this->config['onload'] as $method=>$config) {
            $methodRemove = $method . 'Remove';
            $this->$methodRemove($origin, $this->_primaryKey . '_' . $this->existing, $config);
        }
    }
1187942
def remove_image_info_cb(self, viewer, channel, image_info):
        
        return self.remove_image_cb(viewer, channel.name,
                                    image_info.name, image_info.path)
913686
def remove_media(files):
    
    for filename in files:
        os.remove(os.path.join(settings.MEDIA_ROOT, filename))
601212
def delete_data(self):
        
        self.clean_up()
        tools.delete_dir_rec(self._download_path)
        if self._save_state_file.exists():
            self._save_state_file.unlink()
1085755
def remove_permission(self, file_id, permission_id):
        
        url = '{0}/{1}/permissions/{2}'.format(
            DRIVE_FILES_API_V2_URL,
            file_id,
            permission_id
        )

        self.request('delete', url)
297897
def removeSpecfile(self, specfiles):
        
        for specfile in aux.toList(specfiles):
            del self.container[specfile]
            del self.info[specfile]
871068
def delete_info(ctx, info):
    """"""
    head = ctx.parent.head
    vcf_handle = ctx.parent.handle
    outfile = ctx.parent.outfile
    silent = ctx.parent.silent
    
    if not info:
        logger.error("No info provided")
        sys.exit("Please provide a info string")
    
    if not info in head.info_dict:
        logger.error("Info '{0}' is not specified in vcf header".format(info))
        sys.exit("Please provide a valid info field")
    
    head.remove_header(info)
    
    print_headers(head, outfile=outfile, silent=silent)
    
    for line in vcf_handle:
        line = line.rstrip()
        new_line = remove_vcf_info(keyword=info, variant_line=line)
        print_variant(variant_line=new_line, outfile=outfile, silent=silent)
908093
private function zRemovePemFiles()
    {
        if (is_file($this->pubKeyFile)) {
            unlink($this->pubKeyFile);
        }
        if (is_file($this->priKeyFile)) {
            unlink($this->priKeyFile);
        }
        if (is_file($this->certKeyFile)) {
            unlink($this->certKeyFile);
        }
    }
272077
def _remove_files(self, directory, pattern):
        '''
        
        '''
        for root, dirnames, file_names in os.walk(directory):
            for file_name in fnmatch.filter(file_names, pattern):
                os.remove(os.path.join(root, file_name))
944582
def remove_file(self, file_name, *args, **kwargs):
		
		previous_path = self.session_path()
		try:
			self.session_path(file_name)
			os.unlink(self.full_path())
		finally:
			self.session_path(previous_path)
350338
def __remove_obsolete_metadata(self):
        
        clean = {}
        for key, _ in self._source_file_names.items():
            if key in self._pystratum_metadata:
                clean[key] = self._pystratum_metadata[key]

        self._pystratum_metadata = clean
1105895
def _clean_file(self, filename):
        """"""
        if not os.path.exists(filename):
            return
        self.announce("removing '{}'".format(filename))
        if not self.dry_run:
            os.remove(filename)
579070
def cleanup(self):
        
        for key in self._find_keys(identity='image'):
            image_file = self._get(key)

            if image_file and not image_file.exists():
                self.delete(image_file)

        for key in self._find_keys(identity='thumbnails'):
            # We do not need to check for file existence in here since we
            # already did that above for all image references
            image_file = self._get(key)

            if image_file:
                # if there is an image_file then we check all of its thumbnails
                # for existence
                thumbnail_keys = self._get(key, identity='thumbnails') or []
                thumbnail_keys_set = set(thumbnail_keys)

                for thumbnail_key in thumbnail_keys:
                    if not self._get(thumbnail_key):
                        thumbnail_keys_set.remove(thumbnail_key)

                thumbnail_keys = list(thumbnail_keys_set)

                if thumbnail_keys:
                    self._set(key, thumbnail_keys, identity='thumbnails')
                    continue

            # if there is no image_file then this thumbnails key is just
            # hangin' loose, If the thumbnail_keys ended up empty there is no
            # reason for keeping it either
            self._delete(key, identity='thumbnails')
763953
def remove_tar_files(file_list):
    """"""
    for f in file_list:
        if file_exists(f) and f.endswith('.tar'):
            os.remove(f)