In an desktop-bridge app, I want to find the LocalAppData (or LocalCache) folder of that specific package. I can get the LocalCache folder path with ApplicationData class:
using Windows.Storage;
string appData = ApplicationData.Current.LocalCacheFolder.Path;
Alternatively, if I use SHGetKnownFolderPath function I can also get that same path:
wchar_t* appData;
SHGetKnownFolderPath(FOLDERID_LocalAppData, KF_FLAG_FORCE_APP_DATA_REDIRECTION, NULL, &appData);
So my question: Is it appropriate to use SHGetKnownFolderPath()
instead of ApplicationData class? Both give same path in UWP environment. Is there any drawback/cons to use the first one?