// Forget is called when the filesystem is unmounted. probably.
// see comments here: http://godoc.org/bazil.org/fuse/fs#FSDestroyer
971801
func (r *Root) Forget() {
	err := r.Close()
	if err != nil {
		log.Error(err)
	}
}
864903
func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewRootDeleteAction(persistentvolumesResource, name), &corev1.PersistentVolume{})
	return err
}
14796
func (s *Server) forgetConn(c net.Conn) {
	if _, ok := s.conns[c]; ok {
		delete(s.conns, c)
		s.wg.Done()
	}
}
360504
func (c *Conf) Cleanup() (err error) {
	err = os.RemoveAll(c.dirPath)
	return
}
876228
func (fs CacheableFS) Use() (*libfs.FS, error) {
	return fs.fs.ChrootAsLibFS(fs.subdir)
}
319524
func Sync(mu *sync.Mutex, fs FileSystem) FileSystem {
	return &syncFS{mu, fs}
}
228657
func (_class PVSServerClass) Forget(sessionID SessionRef, self PVSServerRef) (_err error) {
	_method := "PVS_server.forget"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertPVSServerRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_, _err =  _class.client.APICall(_method, _sessionIDArg, _selfArg)
	return
}
1318056
func (c *Client) ForgetNode(node string) {
	c.mutex.Lock()
	defer c.mutex.Unlock()

	delete(c.latencyFilterSamples, node)
}
663865
func (fs *fakeFs) Remove(name string) error {
	return fs.a.Remove(name)
}
1167581
func (n *NomadAgent) Destroy() error {
	if err := n.Stop(); err != nil {
		return err
	}
	return os.RemoveAll(n.DataDir)
}
169768
func (ncs *nodeCacheStandard) forgetLocked(core *nodeCore) {
	ref := core.pathNode.Ref()

	entry, ok := ncs.nodes[ref]
	if !ok {
		return
	}
	if entry.core != core {
		return
	}

	entry.refCount--
	if entry.refCount <= 0 {
		delete(ncs.nodes, ref)
	}
}
8938
func Restore(fd int, st State) error {
	if err := sys.Setattr(fd, sys.TCSANOW, &st.wrap); err != nil {
		return os.NewSyscallError("sys.Setattr", err)
	}
	return nil
}
409588
func (o *Once) Stop(f func() error) error {
	if o.state.CAS(int32(Idle), int32(Stopped)) {
		close(o.startCh)
		close(o.stoppingCh)
		close(o.stopCh)
		return nil
	}

	<-o.startCh

	if o.state.CAS(int32(Running), int32(Stopping)) {
		close(o.stoppingCh)

		var err error
		if f != nil {
			err = f()
		}

		if err != nil {
			o.setError(err)
			o.state.Store(int32(Errored))
		} else {
			o.state.Store(int32(Stopped))
		}
		close(o.stopCh)
		return err
	}

	<-o.stopCh
	return o.loadError()
}
97392
func (d *Driver) Cleanup() error {
	items, err := ioutil.ReadDir(d.info.HomeDir)
	if err != nil {
		if os.IsNotExist(err) {
			return nil
		}
		return err
	}

	// Note we don't return an error below - it's possible the files
	// are locked. However, next time around after the daemon exits,
	// we likely will be able to cleanup successfully. Instead we log
	// warnings if there are errors.
	for _, item := range items {
		if item.IsDir() && strings.HasSuffix(item.Name(), "-removing") {
			if err := hcsshim.DestroyLayer(d.info, item.Name()); err != nil {
				logrus.Warnf("Failed to cleanup %s: %s", item.Name(), err)
			} else {
				logrus.Infof("Cleaned up %s", item.Name())
			}
		}
	}

	return nil
}
200335
func (ks *FSKeystore) Delete(name string) error {
	if err := validateName(name); err != nil {
		return err
	}

	kp := filepath.Join(ks.dir, name)

	return os.Remove(kp)
}
894250
func (d *DiskCache) Del(pathStr string) {
	pathStr = path.Join(d.baseDir, pathStr)
	matches, err := filepath.Glob(pathStr)
	if err != nil {
		return
	}

	// When recursively deleting directories from the cache, it's possible
	// that d.fileList will become out of sync with reality. But that's ok
	// since it just exists to prevent disk access on cache misses, so will
	// just result in a bit of extra disk access.

	d.lock.Lock()
	if pathStr == "*" {
		// Due to the above comment, special case when wiping out the entire
		// cache.
		d.fileList = make(map[string]int)
	}

	for _, match := range matches {
		delete(d.fileList, match)
		err = os.RemoveAll(match)
		if err != nil {
			// log removal failure
		}
	}
	d.lock.Unlock()

}
34913
func (t *File) Remove(ctx context.Context) error {
	_ = t.Close()
	if err := t.unmount(ctx); err != nil {
		return errors.Errorf("Failed to unmount %s from %s: %s", t.dev, t.dir, err)
	}
	if t.dir == "" {
		return nil
	}
	return os.RemoveAll(t.dir)
}