1. A method for writing files to a file system in a non-volatile memory, the method comprising: opening a file stream for writing a first file to the file system; predicting a life expectancy value of the first file, wherein the life expectancy value is a prediction of a length of time the first file will remain stored in the file system; attaching the life expectancy value to the file stream; writing the first file to the file stream to cause the first file to be written to the non-volatile memory according to the life expectancy value attached to the file stream; and identifying a second file having a similar life expectancy to the first file, wherein writing the first file to the file stream includes writing the first file to a buffer associated with an erasable block that is larger than each of the first file and the second file.