Which for JS
    Preparing search index...

    Class Finder

    Finds the instances of an executable in the system path.

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Creates a new finder.

      Parameters

      • options: Partial = {}

        An object providing values to initialize this instance.

      Returns Finder

    Properties

    extensions: Set<string>

    The list of executable file extensions.

    paths: Set<string>

    The list of system paths.

    Accessors

    • get isWindows(): boolean

      Value indicating whether the current platform is Windows.

      Returns boolean

    Methods

    • Finds the instances of an executable in the system path.

      Parameters

      • command: string

        The command to be resolved.

      Returns AsyncGenerator<string, void>

      The paths of the executables found.

    • Gets a value indicating whether the specified file is executable.

      Parameters

      • file: string

        The path of the file to be checked.

      Returns Promise<boolean>

      true if the specified file is executable, otherwise false.