grepSearch
plugin.fs.grepSearch(path: string, query: string, includePattern?: string, excludePattern?: string, caseSensitive: boolean): Promise<GrepSearchResponse>
grepSearch
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | Yes | The path to search within. |
query | string | Yes | The query to search for. |
includePattern | string | No | Pattern of files to include. |
excludePattern | string | No | Pattern of files to exclude. |
caseSensitive | boolean | Yes | Whether 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);