How does logstash identify files?

The file input has code to handle file rotation.