Function unwatchFile

  • Stop watching for changes on a file.

    If the listener is specified, only that particular listener is removed. If no listener is specified, all listeners are removed, and the file is no longer watched.

    Parameters

    • path: PathLike

      The path to the file to stop watching.

    • listener: ((curr, prev) => void) = nop

      Optional listener to remove.

        • (curr, prev): void
        • Parameters

          Returns void

    Returns void