The file is not loaded into memory, so this will work even for gigantic files. Changes to the array are reflected in the file immediately.