// Stop background serving (unmount)
Stop background serving (unmount)
// Stop background serving ( unmount )
func (fs *filesystem) Stop() error {
	fs.cancel()
	fs.mu.Lock()
	defer fs.mu.Unlock()
	var err error
	err = multierr.Append(err, fs.authManager.Stop())
	err = multierr.Append(err, fs.srv.Unmount())
	for _, f := range fs.symlinkFiles {
		err2 := os.Remove(f)
		if err2 != nil && !os.IsNotExist(err2) {
			err = multierr.Append(err, err2)
		}
	}
	if fs.isTempMount {
		err = multierr.Append(err, os.RemoveAll(fs.mountpoint))
	}
	return err
}
func ( fs * filesystem ) Stop ( ) error { fs . cancel ( ) fs . mu . Lock ( ) defer fs . mu . Unlock ( ) var err error err = multierr . Append ( err , fs . authManager . Stop ( ) ) err = multierr . Append ( err , fs . srv . Unmount ( ) ) for _ , f := range fs . symlinkFiles { err2 := os . Remove ( f ) if err2 != nil && ! os . IsNotExist ( err2 ) { err = multierr . Append ( err , err2 ) } } if fs . isTempMount { err = multierr . Append ( err , os . RemoveAll ( fs . mountpoint ) ) } return err }
Stop background serving (unmount)
Stop background serving ( unmount )
// usually system will remove these symlinks on fuse unmounted // just remove expicitly to ensure