Nomad restart task if volume mounted directory content changes

Nomad template is available today with change_mode option to restart a given task if the file content changes (template Stanza - Job Specification | Nomad by HashiCorp). There could be certain scenarios where we would want the task to be restarted if content of a volume mounted directory changes. Is it possible to achieve this in some form through nomad? Doesn’t seem like the regular templates would help here. Any pointers would be appreciated. Thanks.

just an idea, how would you otherwise go about detecting change? checking for last updated timestamp somewhere?