Platform Events
Considering you've already gone through Platform Events section of the documentation, this article will walk you through on how to subscribe to thecldfs__CloudFiles_Event__e event, and handle custom logic based on the event type.
If you've set the `CloudFiles Event Mode` setting to custom object, go through this article - Platform Events Apex Handler (Object Type)

Line #21 in the example above displays outputs from the DocumentProcessed event type(i.e. type number 14 in the list below). Depending on your use case, Here are the avilable platform event types and their custom Apex types that you may use to access relevant information:
For further information on what each of these event types signify, go through the All Event Types section of the documentation.