Write to first line of file

Currently I'm writing a new line to the end of the file.
How do I have to change my code (below) to write to the FIRST line of the file?

File dataFile = FileSystem.open("/tmp/datalog.txt", FILE_APPEND);
  if (dataFile) {
    dataFile.println(dataString);
    dataFile.close();
  }

myFile = SD.open("test.txt", FILE_WRITE); instead of FILE_APPEND

jasit:
myFile = SD.open("test.txt", FILE_WRITE); instead of FILE_APPEND

That won't move everything else in the file down, though, if that's what OP wanted to do. There is no easy way to do that.