FileManager raises client-side before and after events for each file action.

Before events: It's possible to stop a file action (and optionally display a message) by canceling the corresponding before event:
function sampleCancelEventHandler(sender, e) {
    //Optionally displaying a message to the user when canceling
    e.cancelMessage = e.eventName + " event is canceled!";
 
    //Canceling a before event (stops the corresponding action):
    return false;
}

After events: After events can be used to save information about a completed file action. For instance, the information can be logged on the client-side.