have a gridview that contains files and folders. I would like if the user clicked the "add folder", then it will create a folder with the name of the folder the user wants. Users can also move the files into the desired folder by selecting the "move to folder" to folder the user wants (displayed menu folder names available and also menu canceled). Users can also move files that are in the folder, outside of the folder. Users can also delete folders available (if no files available in the folder).
How to apply? Is there any reference or sample to it?
For your required features, uwp has
StorageFile
andStorageFolder
relevant APIs can implement. For example, create folder we can useStorageFolder.CreateFolderAsync
method, delete folder we can useStorageFolder.DeleteAsync
method, and for moving file we can copy the file to the destination folder firstly byStorageFile.CopyAsync
method and then delete the original file byStorageFile.DeleteAsync
method.More details please reference this official document and the official sample File Access.
Pay attention that in uwp files have limited access permission. By the default the app can only access the application install directory and data locations. Additional locations require special capabilities. More details about file access permission please reference this document.