FileHound
    Preparing search index...

    Interface FilePredicate

    A composable test applied to each file found during a search

    interface FilePredicate {
        and(predicate: FilePredicate): FilePredicate;
        not(): FilePredicate;
        or(predicate: FilePredicate): FilePredicate;
        test(file: FileView): Promise<boolean>;
        testSync(file: FileView): boolean;
    }
    Index
    • Asynchronously tests whether a file satisfies this predicate. Used by FileHound.find.

      Parameters

      Returns Promise<boolean>

      a Promise that fulfils with true if the file matches

    • Synchronously tests whether a file satisfies this predicate. Used by FileHound.findSync.

      Parameters

      Returns boolean

      true if the file matches

      TypeError Thrown if the predicate can only be tested asynchronously.