Remove the current process's TensorBoardInfo file, if it exists.

  If the file does not exist, no action is taken and no error is raised.
176850
def remove_info_file():
  
  try:
    os.unlink(_get_info_file_path())
  except OSError as e:
    if e.errno == errno.ENOENT:
      # The user may have wiped their temporary directory or something.
      # Not a problem: we're already in the state that we want to be in.
      pass
    else:
      raise
106020
def remove(in_bam):
    
    if utils.file_exists(in_bam):
        utils.remove_safe(in_bam)
    if utils.file_exists(in_bam + ".bai"):
        utils.remove_safe(in_bam + ".bai")
902096
def remove(self):
        """"""
        if self.exists() or self.islink():
            self.fs.unlink(self.get_internal_path())
            return 1
        return None
315389
def remove(item):
    
    if os.path.isdir(item):
        shutil.rmtree(item)
    else:
        # Assume it's a file. error if not.
        os.remove(item)
892307
def remove(local_file_name):
    
    try:
        os.remove(local_file_name)
    except Exception as e:
        print(
            "Cannot remove file '" + local_file_name + "'. Please remove it manually."
        )
        print(e)
1037910
def remove_file(filename, verbose=True):
    
    if verbose:
        LOG.info('Deleting file %s', os.path.relpath(filename, config.BASE_DIR))
    if not os.path.exists(filename):
        LOG.warning("File does not exist: %s", os.path.relpath(filename, config.BASE_DIR))
    else:
        os.remove(filename)
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)
296301
def cleanup(self):
        """"""
        for file in glob.glob(self.basename + '*'):
            os.unlink(file)
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)
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)
696147
def delete_if_exists(file)
      # Windows cannot delete open files, but we only have a path at this point
      # so it's too late to close the file. report failure to delete files but
      # otherwise continue without failing test.
      begin
        File.delete(file) if File.file?(file)
      rescue Exception => e
        puts "\nWARNING: #{e.message}"
      end
    end
205810
private void removeTaskFromBomFile(File buildGradleTmp) {
        FileReader fileReader;
        BufferedReader bufferedReader = null;
        try {
            fileReader = new FileReader(buildGradleTmp);
            bufferedReader = new BufferedReader(fileReader);
            String currLine;
            String originalLines = "";
            while ((currLine = bufferedReader.readLine()) != null) {
                if (currLine.equals(TASK_COPY_DEPENDENCIES_HEADER)) {
                    break;
                } else {
                    originalLines = originalLines.concat(currLine + Constants.NEW_LINE);
                }
            }
            if (!originalLines.isEmpty()) {
                byte[] bytes = originalLines.getBytes();
                Files.write(Paths.get(buildGradleTmp.getPath()), bytes, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);
            }
        } catch (IOException e) {
            logger.warn("Couldn't remove 'copyDependencies' task from {}, error: {}", buildGradleTmp.getPath(), e.getMessage());
            logger.debug("Error: {}", e.getStackTrace());
        } finally {
            try {
                if (bufferedReader != null) {
                    bufferedReader.close();
                }
            } catch (IOException e) {
                logger.error("Could close the file, cause", e.getMessage());
            }
        }
    }
724047
def delete(self):
        """"""
        if not self.remote:
            if not os.path.exists(self.projectpath + self.basedir + '/' + self.filename):
                return False
            else:
                os.unlink(self.projectpath + self.basedir + '/' + self.filename)

            #Remove metadata
            metafile = self.projectpath + self.basedir + '/' + self.metafilename()
            if os.path.exists(metafile):
                os.unlink(metafile)

            #also remove any .*.INPUTTEMPLATE.* links that pointed to this file: simply remove all dead links
            for linkf,realf in clam.common.util.globsymlinks(self.projectpath + self.basedir + '/.*.INPUTTEMPLATE.*'):
                if not os.path.exists(realf):
                    os.unlink(linkf)

            return True
        else:
            if self.client:
                requestparams = self.client.initrequest()
            else:
                requestparams = {}
            requests.delete( self.projectpath + self.basedir + '/' + self.filename, **requestparams)
            return True
65360
def cleanup_video(self):
        '''
        
        '''
        if self.video_source_process is not None:
            self.video_source_process.terminate()
            logger.info('Terminated video process: %s',
                        self.video_source_process.pid)
            self.video_source_process = None
278108
function remove(conf) {
  var file = conf.get(ConfigKey.PIDFILE);
  // can be the empty string
  if(file) {
    log.notice('removing pid file %s', file);
    try {
      fs.unlinkSync(file);
    }catch(e) {
      log.warning('failed to remove pid file (%s): %s', file, e.message);
    }
  }
}
34655
def cleanup(self):
        """"""
        if self.image:
            try:
                self.image.close()
            except Exception:
                pass
        if (self.outtmp is not None):
            try:
                os.unlink(self.outtmp)
            except OSError as e:
                self.logger.warning("Failed to cleanup tmp output file %s"
                                    % (self.outtmp))
956825
def cleanup(self):
        """"""
        try:
            os.remove(self.pid_file)
        except OSError as exc:
            logger.critical("Could not remove pid_file: %s", exc)

        # Save the final status of the flow.
        self.flow.pickle_dump()