// IgnoredFolder returns whether or not share attempts for the given
// folder should be silently ignored.
768892
func (w *wrapper) IgnoredFolder(device protocol.DeviceID, folder string) bool {
	dev, ok := w.Device(device)
	if !ok {
		return false
	}
	return dev.IgnoredFolder(folder)
}
725293
func (k *SimpleFS) SimpleFSFolderSyncConfigAndStatus(
	ctx context.Context, path keybase1.Path) (
	keybase1.FolderSyncConfigAndStatus, error) {
	ctx = k.makeContext(ctx)
	_, config, err := k.getSyncConfig(ctx, path)
	if err != nil {
		return keybase1.FolderSyncConfigAndStatus{}, err
	}
	res := keybase1.FolderSyncConfigAndStatus{Config: config}

	if config.Mode != keybase1.FolderSyncMode_DISABLED {
		fs, finalElem, err := k.getFSIfExists(ctx, path)
		if err != nil {
			return res, err
		}
		// Use LStat so we don't follow symlinks.
		fi, err := fs.Lstat(finalElem)
		if err != nil {
			return res, err
		}

		if kmg, ok := fi.Sys().(libfs.KBFSMetadataForSimpleFSGetter); ok {
			metadata, err := kmg.KBFSMetadataForSimpleFS()
			if err != nil {
				return keybase1.FolderSyncConfigAndStatus{}, err
			}
			res.Status.PrefetchStatus = metadata.PrefetchStatus
			res.Status.PrefetchProgress =
				metadata.PrefetchProgress.ToProtocolProgress(k.config.Clock())

			dbc := k.config.DiskBlockCache()
			libfs, ok := fs.(*libfs.FS)
			if dbc != nil && ok {
				size, err := dbc.GetTlfSize(
					ctx, libfs.RootNode().GetFolderBranch().Tlf,
					libkbfs.DiskBlockSyncCache)
				if err != nil {
					return res, err
				}
				res.Status.StoredBytesTotal = int64(size)
			}
		} else {
			k.log.CDebugf(ctx,
				"Could not get prefetch status from filesys: %T", fi.Sys())
		}
	}

	res.Status.LocalDiskBytesAvailable, res.Status.LocalDiskBytesTotal =
		k.getLocalDiskStats(ctx)
	return res, err
}
4495
func (c *GroupsListCall) ExcludeArchived(excludeArchived bool) *GroupsListCall {
	c.excludeArchived = excludeArchived
	return c
}
520101
func (m *Manager) FindFolder(name string) string {
	for _, dir := range m.dirs {
		p := filepath.Join(dir, name)
		if files.Exist(p) {
			return p
		}
	}
	return ""
}
639730
func (b *BigIP) ModifyFolder(name string, config *Folder) error {
	return b.put(config, uriSys, uriFolder, name)
}
321631
func (c *Client) ListFolders(name string) ([]os.FileInfo, error) {
	return c.ListFilter(name, func(info os.FileInfo) bool {
		return info.IsDir()
	})
}
69714
func ignored(build config.Build, target target) bool {
	for _, ig := range build.Ignore {
		if ig.Goos != "" && ig.Goos != target.os {
			continue
		}
		if ig.Goarch != "" && ig.Goarch != target.arch {
			continue
		}
		if ig.Goarm != "" && ig.Goarm != target.arm {
			continue
		}
		return true
	}
	return false
}
741375
func (c *Sharing) ListSharedFoldersContinue(in *ListSharedFolderContinueInput) (out *ListSharedFolderOutput, err error) {
	body, err := c.call("/sharing/list_folders/continue", in)
	if err != nil {
		return
	}
	defer body.Close()

	err = json.NewDecoder(body).Decode(&out)
	return
}
643329
func (s *SimpleFSHandler) SimpleFSSetFolderSyncConfig(
	ctx context.Context, arg keybase1.SimpleFSSetFolderSyncConfigArg) error {
	ctx, cancel := s.wrapContextWithTimeout(ctx)
	defer cancel()
	cli, err := s.client()
	if err != nil {
		return err
	}
	return cli.SimpleFSSetFolderSyncConfig(ctx, arg)
}
818316
func (s *PutMappingService) IgnoreConflicts(ignoreConflicts bool) *PutMappingService {
	s.ignoreConflicts = &ignoreConflicts
	return s
}
156696
func (c *folderSummaryService) foldersToHandle() []string {
	// We only recalculate summaries if someone is listening to events
	// (a request to /rest/events has been made within the last
	// pingEventInterval).

	c.lastEventReqMut.Lock()
	last := c.lastEventReq
	c.lastEventReqMut.Unlock()
	if time.Since(last) > minSummaryInterval {
		return nil
	}

	c.foldersMut.Lock()
	res := make([]string, 0, len(c.folders))
	for folder := range c.folders {
		res = append(res, folder)
		delete(c.folders, folder)
	}
	c.foldersMut.Unlock()
	return res
}
348099
func isIgnoredFile(filename string) bool {
	matchFile := path.Base(filename)

	// OS specific ignore list.
	for _, ignoredFile := range ignoreFiles[runtime.GOOS] {
		matched, err := filepath.Match(ignoredFile, matchFile)
		if err != nil {
			panic(err)
		}
		if matched {
			return true
		}
	}

	// Default ignore list for all OSes.
	for _, ignoredFile := range ignoreFiles["default"] {
		matched, err := filepath.Match(ignoredFile, matchFile)
		if err != nil {
			panic(err)
		}
		if matched {
			return true
		}
	}

	return false
}
549923
func clean() (err error) {
	if err := r.Settings.Remove(realize.RFile); err != nil {
		return err
	}
	log.Println(r.Prefix(realize.Green.Bold("folder successfully removed")))
	return nil
}
378814
func (s *FieldCapsService) IgnoreUnavailable(ignoreUnavailable bool) *FieldCapsService {
	s.ignoreUnavailable = &ignoreUnavailable
	return s
}
1212264
func (cli *Client) ForgetRoom(roomID string) (resp *RespForgetRoom, err error) {
	u := cli.BuildURL("rooms", roomID, "forget")
	_, err = cli.MakeRequest("POST", u, struct{}{}, &resp)
	return
}
1204012
func (s *ClusterStateService) IgnoreUnavailable(ignoreUnavailable bool) *ClusterStateService {
	s.ignoreUnavailable = &ignoreUnavailable
	return s
}
723711
func (m *model) checkFolderRunningLocked(folder string) error {
	_, ok := m.folderRunners[folder]
	if ok {
		return nil
	}

	if cfg, ok := m.cfg.Folder(folder); !ok {
		return errFolderMissing
	} else if cfg.Paused {
		return ErrFolderPaused
	}

	return errFolderNotRunning
}