We have a need to trigger recompilation of a module when any file inside a directory is added or removed since we add the list of files at compilation time as a module attribute which is used in guard statements.
Something like
```
defmodule Example do
@files File.ls!("some-path")
end
```
I think Phoenix's `embed_templates` would have to use a similar feature if Phoenix didn't take care of triggering recompilation itself.
Implementation wise I'd think it might probably suffice to set the `digest` as the hash of the list of files (probably recursively?) in the directory, but there might be better ways to do this.
If there is another already existing way to achieve the same please let me know, maybe I'm just missing something!
Best regards, Alex.