How does FPGA knows the configuraton file is present in Flash memory during bootup?
In general the FPGA does not know or care if the FPGA has a file present before it tries to load the configuration data. There is a CRC in the file that is checked at the end of configuration that the FPGA uses to determine if a valid configuration has been loaded. There is a signal called CONFIG_DONE that indicates if the configuration was successful.