Convert the internal `FileInfo` class to attrs and add type hints.