@salesforce/core
    Preparing search index...

    Variable traverseConst

    traverse: {
        forFile: (dir: string, file: string) => Promise<Optional<string>>;
        forFileSync: (dir: string, file: string) => Optional<string>;
    } = ...

    These methods were moved from the deprecated 'fs' module in v2 and are only used in sfdx-core above

    They were migrated into the 'traverse' constant in order to stub them in unit tests

    Type Declaration

    • forFile: (dir: string, file: string) => Promise<Optional<string>>

      Searches a file path in an ascending manner (until reaching the filesystem root) for the first occurrence a specific file name. Resolves with the directory path containing the located file, or null if the file was not found.

    • forFileSync: (dir: string, file: string) => Optional<string>

      Searches a file path synchronously in an ascending manner (until reaching the filesystem root) for the first occurrence a specific file name. Resolves with the directory path containing the located file, or null if the file was not found.