FileSearchOptions: {
    fileTypes?: string[];
    maxResults?: number;
    modifiedAfter?: Date;
    modifiedBefore?: Date;
    pathPrefix?: string;
    providerSpecific?: Record<string, any>;
    searchContent?: boolean;
}

Options for configuring a file search operation. These options allow for flexible, provider-agnostic search capabilities while still leveraging native provider search features where available.

Type declaration

  • Optional fileTypes?: string[]

    File types to include in search results. Examples: ['pdf', 'docx', 'xlsx'], ['image/*'], ['text/plain'] Can use MIME types or file extensions.

  • Optional maxResults?: number

    Maximum number of results to return. Defaults to 100 if not specified.

  • Optional modifiedAfter?: Date

    Only return files modified after this date.

  • Optional modifiedBefore?: Date

    Only return files modified before this date.

  • Optional pathPrefix?: string

    Restrict search to files within this path prefix. Example: 'documents/reports/' would only search within that directory.

  • Optional providerSpecific?: Record<string, any>

    Additional provider-specific search parameters. This allows providers to expose advanced features not covered by common options. Example: { 'trashed': false } for Google Drive, { 'scope': 'personal' } for SharePoint

  • Optional searchContent?: boolean

    Whether to search file contents in addition to names and metadata. Not all providers support content search. Defaults to false.