Assuming the hook is written in Python, you define it as something like
def check_files(ui, repo, **kwargs):
...
Then repo.status()
returns all files with their respective status. There is TODO to add more details in this place in the documentation :)