In my application targeting UWP i want to disable a save ("overwrite") button, if the file (modified in my application) has been opened from location where the application cannot write (in this case "Save As" will only be available). The application is allowed however to write to KnownFolders.PicturesLibrary, and I need to determine in code, if given path is located within the PicturesLibrary (or nested subfolder of this location).
I'm able to tell if one path is subfolder of another, but for the StorageFolder
StorageFolder picturesDirectory = KnownFolders.PicturesLibrary;
I get empty Path property value.
So, how can I tell that a given path is or is not located in PicturesLibrary?
Any way to resolve KnownFolders.Pictures library into disk path?
Or should I use something else, other than absolute path, obtained upon file opening to identify later if the file comes from PicturesLibrary?