I intend to keep track of the FileSystem video files with KnownFolders.VideosLibrary
and also the FutureAccessList
(which can make me access items outside the video library).
I want to save some data in reference to each StorageFile
object being used in my app. so for that first I thought of using SavePropertiesAsync
method to save metadata on properties of the storagefiles so that I can access them even if the file moves to some other location in the system, or if it gets deleted futureaccesslist will remove it automatically from itself. but I am getting ACCESS DENIED exception on SavePropertiesAsync()
method. and yes I am using VideoLibrary
capability in my app and I am attempting this method on a file which is within KnownFolder.VideoLibrary
.
Now that saveProperties isn't working, I am thinking of creating a database in my app and track the data by using FolderRelativeId
of StorageFile
and tracking the data against that property, because it is unique for each file even with same names. the only limitation in this scenario is that, folder related id changes when the files moves in filesystem, which cannot be notified to my app, (unless it is running, so I may use StorageLibraryTracker
api). Also if the file gets deleted, I won't know about that either.
So to summarize what is a property on a StorageFile
object which I can use to sync any custom metadata, between my file and that specific video file, obviously that property should remain same for that file, irrespective of where it moves in the filesystem.