Skip to main content

grepSearch

plugin.fs.grepSearch(path: string, query: string, includePattern?: string, excludePattern?: string, caseSensitive: boolean): Promise<GrepSearchResponse>

grepSearch

Parameters

ParameterTypeRequiredDescription
pathstringYesThe path to search within.
querystringYesThe query to search for.
includePatternstringNoPattern of files to include.
excludePatternstringNoPattern of files to exclude.
caseSensitivebooleanYesWhether the search is case sensitive. (default: true)

Returns

Promise<GrepSearchResponse> — A promise that resolves with the search results.

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.fs.grepSearch('path', 'query', true);
console.log(result);