GetFiles, getAllFilesInFolder ...

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
Poulpator
Posts: 9
Joined: Thu Jan 02, 2014 8:05 pm

GetFiles, getAllFilesInFolder ...

Post by Poulpator »

Hi,
First I'll say I'm very glad I bought EasySave more than a year ago. It's fast, easy to use and the new features arrived just when I needed them :P

I recently updated and am confused about some stuff though, about how to use EasySave exactly...
First, are we supposed to be still using EasySave or just ES2? I'm wondering since in this example:
http://moodkie.com/easysave/documentati ... -getfiles/
you use this GetFiles function:
string[] filesInFolder = ES2.GetFiles("myFolder/");
which seems to exist only in EasySave and not ES2, so is it a typo or is there something wrong with my files?

Also, I noticed the getAllFilesInFolder function disappeared. Is there some reason for its disappearance, are we supposed to do that in a different way now?
It's not a big deal either, for the moment I just reprogrammed it...
( return Directory.GetFiles(getPersistentDataPath()+"/"+folder,"*"+fileExtension,SearchOption.AllDirectories); )

Thanks for your attention
Olivier
User avatar
Joel
Moodkie Staff
Posts: 4863
Joined: Wed Nov 07, 2012 10:32 pm

Re: GetFiles, getAllFilesInFolder ...

Post by Joel »

Hi Olivier, and thanks for the good feedback :)

Easy Save 1 has been discontinued for around a year now, so Easy Save 2 is the current version (it's quicker and more reliable, as well as having many more features).

The only reason I can think that ES2.GetFiles(string folder) isn't appearing for you is if you're using an older version of Easy Save 2 or if it didn't download properly from the Asset Store. Try deleting all files related to Easy Save 2 from the Assets folder and re-downloading it from the Asset Store.

To clarify, ES2.GetFiles should do the exact same thing as the old getAllFilesInFolder function.

All the best,
Joel
User avatar
Joel
Moodkie Staff
Posts: 4863
Joined: Wed Nov 07, 2012 10:32 pm

Re: GetFiles, getAllFilesInFolder ...

Post by Joel »

One more thing I forgot to mention: if you haven't done already, you'll need to delete Easy Save from your project as the two will conflict.

- Joel
Poulpator
Posts: 9
Joined: Thu Jan 02, 2014 8:05 pm

Re: GetFiles, getAllFilesInFolder ...

Post by Poulpator »

Thanks for your quick answer!
I had EasySave AND EasySave2 Beta still installed, deleting them and re-installing EasySave2 gave me access to all the ES2 functions.

Another question if I may...
One reason I still used the old EasySave functions was because I couldn't -and still can't- find the equivalent of GetAllFiles (with recursion) and getFilesInFolder (with extension filtering) in ES2.
I searched in the documentation but I can't see how to do it with settings or parameters either...
Now those functions are not difficult to code, so it's not a big issue, but I wanted to check if I was not missing something or if they were removed for some deeper reason I could be interested in...
(I'm trying to make an application that loads and saves files both in standalone version on disk and in web player version on cloud, and I am quite a beginner with all that cloud stuff... That's the reason I was so glad to see it was added to ES2!)

Thanks,
Olivier
User avatar
Joel
Moodkie Staff
Posts: 4863
Joined: Wed Nov 07, 2012 10:32 pm

Re: GetFiles, getAllFilesInFolder ...

Post by Joel »

Glad to hear that fixed your problem!

Looking back at our change logs, the recursive and extension filtered versions weren't added to Easy Save 2 due to lack of demand. However, I'll arrange to have a GetFilesRecursive method added to the next update. I'll also add a parameter to GetFiles and GetFilesRecursive which will allow you to specify an extension.

All the best,
Joel
Poulpator
Posts: 9
Joined: Thu Jan 02, 2014 8:05 pm

Re: GetFiles, getAllFilesInFolder ...

Post by Poulpator »

Well... awesome, thank you very much!
I'm adding a 5 star review on the asset store to express my gratitude :D
Locked