How does the client index? Looking for help understanding the programming

What does it do when it indexes? What files get updated? What source code(which file) does the indexing? Also what does it use to open, read, copy files ( fopen , fread , fwrite)? I’m just trying to understand how it works and what it uses. Any links to specific source files would be of great help!

Thanks for anything.