Like :meth:`remove`, but does not raise an exception if the
        file does not exist.
167808
def remove_p(self):
        
        try:
            self.unlink()
        except OSError:
            _, e, _ = sys.exc_info()
            if e.errno != errno.ENOENT:
                raise
        return self
1030121
def removeFileSafely(filename,clobber=True):
    
    if filename is not None and filename.strip() != '':
        if os.path.exists(filename) and clobber: os.remove(filename)
591110
def delete(self):
        """"""
        self.close()
        if self.does_file_exist():
            os.remove(self.path)
1317539
def force_delete_file(file_path):
        '''  '''
        if os.path.isfile(file_path):
            try:
                os.remove(file_path)
                return file_path
            except:           
                return FileSystemUtils.add_unique_postfix(file_path)
        else:
            return file_path
1257699
def delete(key)
      file = filename key
      File.delete file if File.exist? file
    end
225091
def remove(name=None, index=None):
    

    removed = False
    count = 1
    for configuration in _CONFIG.sections():
        if index != None:
            if count == index:
                _CONFIG.remove_section(configuration)
                removed = True
                break

        if name != None:
            if configuration == name:
                _CONFIG.remove_section(configuration)
                removed = True
                break

        count += 1

    if not removed:
        raise JutException('Unable to find %s configuration' % name)

    with open(_CONFIG_FILEPATH, 'w') as configfile:
        _CONFIG.write(configfile)
1009355
def remove(self, abspath_or_winfile, enable_verbose=True):
        
        if isinstance(abspath_or_winfile, str): # abspath
            try:
                del self.files[abspath_or_winfile]
            except KeyError:
                if enable_verbose:
                    print("'%s' are not in this file collections" % 
                          abspath_or_winfile)
        elif isinstance(abspath_or_winfile, WinFile): # WinFile
            try:
                del self.files[abspath_or_winfile.abspath]
            except KeyError:
                if enable_verbose:
                    print("'%s' are not in this file collections" % 
                          abspath_or_winfile)
        else:
            raise TypeError
497246
def safe_delete(filename):
  """"""
  try:
    os.unlink(filename)
  except OSError as e:
    if e.errno != errno.ENOENT:
      raise
667257
def delete(self, *args, **kwargs):
        
        try:
            os.remove(self.file.file.name)
        # image does not exist
        except (OSError, IOError):
            pass
        super(Image, self).delete(*args, **kwargs)
767337
def remove(self):
        
        if isfile(self.pid_file):
            try:
                remove(self.pid_file)
            except Exception as e:
                self.die('Failed to remove PID file: {}'.format(str(e)))
        else:
            return True
880818
def __remove_if_expired(self, filename):
        
        if not self.duration:
            return
        created = datetime.datetime.fromtimestamp(os.path.getctime(filename))
        expired = created + self.duration
        if expired < datetime.datetime.now():
            os.remove(filename)
            log.debug("%s expired, deleted", filename)
916703
def delete_file_or_tree(*args):
    

    for f in args:
        try:
            os.unlink(f)
        except OSError:
            shutil.rmtree(f, ignore_errors=True)
694567
def safe_remove(path):
    
    if not os.path.exists(path):
        return

    try:
        if os.path.isdir(path) and not os.path.islink(path):
            shutil.rmtree(path)
        else:
            os.remove(path)
    except OSError:
        if os.path.exists(path):
            raise
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)
815817
def remove_file(self, name):
        """"""
        self.check_write(name)
        path = os.path.join(self.cur_dir, name)
        os.remove(path)
92919
def unlock_file(filename):
    '''
    
    '''
    log.trace('Removing lock for %s', filename)
    lock = filename + '.lock'
    try:
        os.remove(lock)
    except OSError as exc:
        log.trace('Unable to remove lock for %s: %s', filename, exc)
778760
def delete(self):
        """"""
        self._ensure_filename()
        self._close_if_open()
        os.remove(self.filename)