manuel.gysin Posted April 3, 2012 Posted April 3, 2012 Hello Following code returns all the time 0: // Check if file exists File file = new File(); if(file.open( engine.getDataPath() + "settings.xml", "w+")) // -rw-rw-r-- 1 mgysin mgysin 604 Apr 3 11:00 settings.xml -> 604 Bytes log.error(string(file.getSize())); I have no windows client for testing, but the error occurs on linux all the time. kind regard Manuel
unclebob Posted April 9, 2012 Posted April 9, 2012 Hi, This is correct behavior as 'w+' mode always truncate your file. Use 'r+' or 'a+' instead.
Recommended Posts