I cant delete the file on game
Re: I cant delete the file on game
Any chance we can get a ClearSaves() function that might delete the cache and the file? I was surprised when I deleted the SaveFile.es3 from my directory and it still loaded the data. Now I get why, but that's kinda interesting behavior.
Re: I cant delete the file on game
Hi there,
This script will add ES3Tools.DeleteFileFromAllLocations() and ES3Tools.DeleteFileFromAllLocations(string filePath) methods to your project.
All the best,
Joel
This script will add ES3Tools.DeleteFileFromAllLocations() and ES3Tools.DeleteFileFromAllLocations(string filePath) methods to your project.
Code: Select all
public static class ES3Tools
{
// Deletes the default save file from disk and cache.
public static void DeleteFileFromAllLocations()
{
ES3.DeleteFile(new ES3Settings(ES3.Location.File));
ES3.DeleteFile(new ES3Settings(ES3.Location.Cache));
}
// Delets the file with the given name or path from disk and cache.
public static void DeleteFileFromAllLocations(string filePath)
{
ES3.DeleteFile(filePath, new ES3Settings(ES3.Location.File));
ES3.DeleteFile(filePath, new ES3Settings(ES3.Location.Cache));
}
}
Joel