I want to give the player the opportunity to have multiple save files and name them as he/she sees fit. I now want to check if my save folder has any file of that type rather than a specific file, to see if it makes sense to give the option of loading.
if (ES2.Exists("*.dat")) print("true");
else print("false");
However, my code returns false even though I have according data in the according folder. Is there a way to check for any file instead of a specific file or a folder (both are no options in my case)?
You can use ES2.GetFiles(string folder, string extension) to get all of the files in a folder with a particular extension. So to find out if any files exist in the default save folder with a a .dat extension, you should be able to do: