Maybe java.io.File.isDirectory() and java.io.File..list() if you can figure out what you want to delete by looking at filenames.
On Jan 20, 2:32 pm, Kevin Duffey <[email protected]> wrote: > Not sure of other ways, but couldn't you use some sort of preference check > for a new flag the update only knows about, if it's not there, wipe the > saves out then set it? Some sort of "first run" flag for the update? > > On Wed, Jan 20, 2010 at 2:30 PM, Joshua Frank <[email protected]> wrote: > > I have a game the allows the user to save the game in a file. I have a > > new update coming out the will make the previous saved games not work. > > Is the any way to delete all the files that my program created? > > > I have been serializing the games and saving them like this: > > > ObjectOutputStream os = new ObjectOutputStream(openFileOutput(gameName > > + ".sav", 0)); > > os.writeObject(gameObject); > > > I know I can go through the list of games and do something like this > > > for(GameName name : gameList) > > { > > deleteFile(name + ".sav"); > > } > > > I would like to know if I can clear out files that I may not know > > about like if the game name has changed is a previous version. > > > In short this is a major update and I would love to force the user to > > make a fresh install, deleting all files, preferences and database > > info. Is there an easy way to do this? > > > -- > > Joshua Frank > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected]<android-developers%[email protected]> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

