Library/PackageCache/com.unity.quicksearch@1.6.0-preview.8/Editor/Indexing/ObjectIndexer.cs
/// <summary>
/// Called when the index is built to see if a specified document needs to be indexed. See <see cref="SearchIndexer.skipEntryHandler"/>
/// </summary>
/// <param name="path">Path of a document</param>
/// <param name="checkRoots"></param>
/// <returns>Returns true if the document doesn't need to be indexed.</returns>
Called when the index is built to see if a specified document needs to be indexed. See
Called when the index is built to see if a specified document needs to be indexed . See
public override bool SkipEntry(string path, bool checkRoots = false)
        {
            if (checkRoots)
            {
                if (!GetRoots().Any(r => path.StartsWith(r, StringComparison.OrdinalIgnoreCase)))
                    return true;
            }
            if (!settings.options.directories && Directory.Exists(path))
                return true;
            if (!settings.options.files && File.Exists(path))
                return true;
            var ext = Path.GetExtension(path);
            if (ext.EndsWith("index", StringComparison.OrdinalIgnoreCase))
                return true;
            var dir = Path.GetDirectoryName(path);
            if (settings.includes?.Length > 0 && !settings.includes.Any(pattern => PatternChecks(pattern, ext, dir, path)))
                return true;
            if (settings.excludes?.Length > 0 && settings.excludes.Any(pattern => PatternChecks(pattern, ext, dir, path)))
                return true;
            return false;
        }
public override bool SkipEntry ( string path , bool checkRoots = false ) { if ( checkRoots ) { if ( ! GetRoots ( ) . Any ( r => path . StartsWith ( r , StringComparison . OrdinalIgnoreCase ) ) ) return true ; } if ( ! settings . options . directories && Directory . Exists ( path ) ) return true ; if ( ! settings . options . files && File . Exists ( path ) ) return true ; var ext = Path . GetExtension ( path ) ; if ( ext . EndsWith ( " " , StringComparison . OrdinalIgnoreCase ) ) return true ; var dir = Path . GetDirectoryName ( path ) ; if ( settings . includes ? . Length > 0 && ! settings . includes . Any ( pattern => PatternChecks ( pattern , ext , dir , path ) ) ) return true ; if ( settings . excludes ? . Length > 0 && settings . excludes . Any ( pattern => PatternChecks ( pattern , ext , dir , path ) ) ) return true ; return false ; }
Called when the index is built to see if a specified document needs to be indexed.
Called when the index is built to see if a specified document needs to be indexed .
// Exclude indexes by default
Returns true if the document doesn't need to be indexed.
Returns true if the document doesn ' t need to be indexed .
path
string
Path of a document
Path of a document
checkRoots
bool
None