Crumbtrail
    Preparing search index...

    Represents an implementation of a ZFileRepository that watches a given path scope.

    This repository is only concerned about files. Folders will not be retrieved from this repository.

    Implements

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    • Retrieves the total count of data items before pagination.

      Parameters

      • request: IZDataRequest

        The data request being made. The page and size fields are ignored in this instance.

      Returns Promise<number>

      The total number of items across pages that the request data set will represent.

    • Initializes the repository with the given root and glob filter.

      This will initially scan the file system and setup watches. If you call this method again, then the repository will be reset and a new set of files will be added to the repository.

      Parameters

      • path: string

        The root path of the repository.

      • globs: string[] = ...

        The optional relative globs of the repository. If this is falsy, then ** is used. You can achieve the same kind of operation using filters, but filtering out unwanted files frees up the internal memory being used.

      Returns Promise<void>