Remove dump from tmp path.

 @param [String] path the path, where the dump/archive is located.

 @return [nil]
4715
def cleanup_tar_file(path)
      Mongolicious.logger.info("Cleaning up local path #{path}")
      begin
        File.delete(path)
      rescue => exception
        Mongolicious.logger.error("Error trying to delete: #{path}")
        Mongolicious.logger.info(exception.message)
      end
    end
540798
function _deleteDir(path) {
  if (fs.existsSync(path)) {
    var subpaths = fs.readdirSync(path);
    subpaths.forEach(function(subpath) {
      var curPath = path + '/' + subpath;
      if (fs.lstatSync(curPath).isDirectory()) {
        _deleteDir(curPath);
      } else {
        fs.unlinkSync(curPath);
      }
    });
    fs.rmdirSync(path);
  }
}
657056
public static void moveToTrash(FileSystem fs, Path path) throws IOException {
    Trash trash = new Trash(fs, new Configuration());
    trash.moveToTrash(path);
  }
1235864
def unmount_module
      path = "#{@target_dir}/app/apis/#{@project_name}"
      temp_file = "#{path}/tmp.rb"
      source = "#{path}/base.rb"
      delete_file = "#{path}/modules/#{@module_name}_apis.rb"
      
      File.open(temp_file, "w") do |out_file|
        File.foreach(source) do |line|
          unless line == "require_relative './modules/#{@module_name}_apis'\n"
            out_file.puts line unless line == "\t\tmount #{@module_class}\n"
          end
        end
        FileUtils.mv(temp_file, source)
      end
      
      if File.exists?(delete_file)
        FileUtils.rm(delete_file) 
        $stdout.puts "\e[1;35m\tunmounted\e[0m\t#{@module_class}" 
        $stdout.puts "\e[1;31m\tdelete\e[0m\t\tapp/apis/#{@project_name}/modules/#{@module_name}_apis.rb" 
      else
        $stdout.puts "\e[33mModule already unmounted.\e[0m"
      end
    end
601447
def remove_file(self, path):
        """"""
        self.get_file(path).remove()
        self.remove_cache_buster(path)
1200948
protected void removeIndexBackup(String path) {

        if (!isBackupReindexing()) {
            // if no backup is generated we don't need to do anything
            return;
        }

        // check if the target directory already exists
        File file = new File(path);
        if (!file.exists()) {
            // index does not exist yet
            return;
        }
        try {
            FSDirectory dir = FSDirectory.open(file.toPath());
            dir.close();
            CmsFileUtil.purgeDirectory(file);
        } catch (Exception e) {
            LOG.error(Messages.get().getBundle().key(Messages.LOG_IO_INDEX_BACKUP_REMOVE_2, getName(), path), e);
        }
    }
104573
def CleanUp(self, path):
    """"""
    try:
      if os.path.exists(path):
        os.remove(path)
    except (OSError, IOError) as e:
      logging.info("Failed to remove temporary file %s. Err: %s", path, e)
891982
def remove_library_path(path: str) -> bool:
    

    if path in sys.path:
        sys.path.remove(path)
        return True

    return False
904788
def path
      temporary = []
      actual_route = nil
      router do |route|
        actual_route = extract_and_format_route(route)
        temporary.push(actual_route) unless temporary.include?(actual_route)
        actual_route
      end
      temporary
    end
656901
def remove_checksum(path):
    

    path = '{}.md5sum'.format(path)
    if os.path.exists(path):
        os.remove(path)
1070543
def remove_slug(path):
    
    if path.endswith('/'):
        path = path[:-1]
    if path.startswith('/'):
        path = path[1:]
    if "/" not in path or not path:
        return None
    parts = path.split("/")[:-1]
    return "/".join(parts)
1252877
def delete(self, path):
        
        mountpoint, chunks = self.get_mountpoint(path)
        apath = self._join_chunks(chunks)

        if mountpoint is None:
            try:
                simfile = self._files.pop(apath)
            except KeyError:
                return False
            else:
                self.state.history.add_event('fs_unlink', path=apath, unlink_idx=len(self.unlinks))
                self.unlinks.append((apath, simfile))
                return True
        else:
            return mountpoint.delete(chunks)
1224048
def delete_file(path)
      Jekyll.logger.debug "DELETING:", path
      FileUtils.rm_f sanitized_path(path)
      site.process
    end
803528
def recursive_delete(path: nil)
      raise ArgumentError, "path is a required argument" if path.nil?

      result = zk.get_children(path: path)
      raise Kazoo::Error, "Failed to list children of #{path} to delete them. Result code: #{result.fetch(:rc)}" if result.fetch(:rc) != Zookeeper::Constants::ZOK

      threads = result.fetch(:children).map do |name|
        Thread.new do
          Thread.abort_on_exception = true
          recursive_delete(path: File.join(path, name))
        end
      end
      threads.each(&:join)

      result = zk.delete(path: path)
      raise Kazoo::Error, "Failed to delete node #{path}. Result code: #{result.fetch(:rc)}" if result.fetch(:rc) != Zookeeper::Constants::ZOK
    end
604022
def remove(self, path):
        """"""
        p = self.cmd('shell', 'rm', path)
        stdout, stderr = p.communicate()
        if stdout or stderr:
            return False
        else:
            return True
599550
def delete(path, params = {}, header = {})
      _send(Net::HTTP::Delete.new(expand_path(path, params), expand_header(header)))
    end
1078090
def file_remove(self, path, filename):
        
        if os.path.isfile(path + filename):
            os.remove(path + filename)