// shouldIgnoreFile ignores filenames generated by Emacs, Vim or SublimeText.
// It returns true if the file should be ignored, false otherwise.
430506
func shouldIgnoreFile(filename string) bool {
	for _, regex := range ignoredFilesRegExps {
		r, err := regexp.Compile(regex)
		if err != nil {
			beeLogger.Log.Fatalf("Could not compile regular expression: %s", err)
		}
		if r.MatchString(filename) {
			return true
		}
		continue
	}
	return false
}
675443
func NewFileCustomRule() (fcr *FileCustomRule) {
	fcr = new(FileCustomRule)
	fcr.path = ""
	fcr.currentRuleSet = rules.New()
	return fcr
}
1042993
func FileExist(filePath string) bool {
	_, err := os.Stat(filePath)
	if err != nil && os.IsNotExist(err) {
		return false
	}

	return true
}
876859
func isFile(name string) (bool, error) {
	info, err := os.Stat(name)
	return err == nil && !info.IsDir(), err
}
574916
func SetIgnoreError(on bool) {
	if on {
		atomic.StoreUint32(&ignoreError, 1)
	} else {
		atomic.StoreUint32(&ignoreError, 0)
	}
}
17288
func (o options) shouldCompress(contentType string, statusCode int) bool {
	// If contentTypes is nil we handle all content types.
	if len(o.contentTypes) > 0 {
		ct := strings.ToLower(contentType)
		ct = strings.Split(ct, ";")[0]
		found := false
		for _, v := range o.contentTypes {
			if strings.HasPrefix(ct, v) {
				found = true
				break
			}
		}
		if !found {
			return false
		}
	}
	if len(o.statusCodes) > 0 {
		_, ok := o.statusCodes[statusCode]
		if !ok {
			return false
		}
	}

	return true
}
904169
func shouldWatchFileWithExtension(name string) bool {
	for _, s := range watchExts {
		if strings.HasSuffix(name, s) {
			return true
		}
	}
	return false
}
558925
func (actor Actor) FileExists(path string) bool {
	_, err := os.Stat(path)
	return err == nil
}
84829
func DoesFileExist(fileName string) bool {
	_, err := os.Stat(fileName)
	if os.IsNotExist(err) {
		return false
	}
	return true
}
200743
func (s *SourceSpec) IgnoreFile(filename string) bool {
	if filename == "" {
		if _, ok := s.SourceFs.(*afero.OsFs); ok {
			return true
		}
		return false
	}

	base := filepath.Base(filename)

	if len(base) > 0 {
		first := base[0]
		last := base[len(base)-1]
		if first == '.' ||
			first == '#' ||
			last == '~' {
			return true
		}
	}

	if len(s.ignoreFilesRe) == 0 {
		return false
	}

	for _, re := range s.ignoreFilesRe {
		if re.MatchString(filename) {
			return true
		}
	}

	return false
}
145245
func (l Lexer) AcceptsFilename(name string) (bool, error) {
	for _, fn := range l.Filenames {
		if matched, err := path.Match(fn, name); err != nil {
			return false, fmt.Errorf("malformed filename pattern '%s' for "+
				"lexer '%s': %s", fn, l.Name, err)
		} else if matched {
			return true, nil
		}
	}
	return false, nil
}
788674
func (f *Filter) shouldFieldPass(key string) bool {
	if f.fieldPass != nil && f.fieldDrop != nil {
		return f.fieldPass.Match(key) && !f.fieldDrop.Match(key)
	} else if f.fieldPass != nil {
		return f.fieldPass.Match(key)
	} else if f.fieldDrop != nil {
		return !f.fieldDrop.Match(key)
	}
	return true
}
172113
func (sfn *specialFileNode) ShouldCreateMissedLookup(
	ctx context.Context, name string) (
	bool, context.Context, data.EntryType, os.FileInfo, string) {
	if !perTlfWrappedNodeNames[name] {
		return sfn.Node.ShouldCreateMissedLookup(ctx, name)
	}

	switch name {
	case StatusFileName:
		sfn := &statusFileNode{
			Node:   nil,
			fb:     sfn.GetFolderBranch(),
			config: sfn.config,
			log:    sfn.log,
		}
		f := sfn.GetFile(ctx)
		return true, ctx, data.FakeFile, f.(*wrappedReadFile).GetInfo(), ""
	default:
		panic(fmt.Sprintf("Name %s was in map, but not in switch", name))
	}

}
865744
func DeleteFilesIgnoringErrors(dir FileDeleter, files ...string) {
	for _, name := range files {
		dir.DeleteFile(name) // ignore error
	}
}
366245
func shouldIgnoreFrame(f runtime.Frame) bool {
	if strings.Contains(f.File, "_test.go") {
		return false
	}
	if strings.Contains(f.File, "go.uber.org/fx") {
		return true
	}
	return false
}
1139531
func (opts DeprecationOptions) ShouldHandle() bool {
	return opts.WarnMessage != "" || !opts.DeprecationDate.IsZero() || opts.DeprecationInfo != ""
}
1092394
func (rd *RAMDirectory) FileExists(name string) bool {
	rd.EnsureOpen()
	rd.fileMapLock.RLock()
	defer rd.fileMapLock.RUnlock()
	_, ok := rd.fileMap[name]
	return ok
}