Subscribes to a file stream, incrementing its usage counter. If the file stream is not already open, it will be opened automatically.

Thrown if the environment is not a Node.js server.

Thrown if an unexpected error occurs while subscribing to the file stream.

  • Parameters

    • filePath: string

      The path to the file of the stream.

    Returns Promise<void>

    A promise that resolves when the subscription is successful.