Programme for a gps/sd card/sensors - compilation problems (for a novice)

{
    
}

Useful.

void loop()

{
  while(1)
  {
    if(GPS.available())
    {
      // THIS IS THE MAIN LOOP JUST READS IN FROM THE GPS SERIAL AND ECHOS OUT TO THE ARDUINO SERIAL.
      Serial.write(GPS.read()); 
    }
 
  }
}

Where is there any code to open a file? To write data to that file? To close that file?