read folder to make file list and get giant components by graph