1
ファイルをローカルストレージからsdカードまたはWP8.1の既知のフォルダにバックアップ目的でコピーするにはどうすればよいですか?WP8.1のローカルストレージからSDカードへのSqliteファイルのコピー
私はフォルダの選択を使用して保存場所を選択しています。
Private Async Sub ButtonBackup_Click(sender As Object, e As RoutedEventArgs)
Dim FolderPicker As New FolderPicker()
FolderPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary
FolderPicker.ViewMode = PickerViewMode.List
FolderPicker.PickFolderAndContinue()
End Sub
Public Async Sub ContinueFolderPicker(ByVal args As FolderPickerContinuationEventArgs) Implements IFolderPickerContinuable.ContinueFolderPicker
Dim folder As StorageFolder = args.Folder
If folder IsNot Nothing Then
' Application now has read/write access to all contents in the picked folder (including other sub-folder contents)
StorageApplicationPermissions.FutureAccessList.AddOrReplace("PickedFolderToken", folder)
'OutputTextBlock.Text = "Picked folder: " & folder.Name
Else
'OutputTextBlock.Text = "Operation cancelled."
End If
Dim file As StorageFile = Await Windows.Storage.ApplicationData.Current.LocalFolder.GetFileAsync("ContactsManager.sqlite")
CopyFileToFolder(file, folder)
End Sub
Public Async Sub CopyFileToFolder(ByVal filetoCopy As StorageFile, ByVal folder As StorageFolder)
Await filetoCopy.CopyAsync(folder)
End Sub
しかし、以下の行が起動しない:
私のコードがある
Public Async Sub ContinueFolderPicker(ByVal args As FolderPickerContinuationEventArgs) Implements IFolderPickerContinuable.ContinueFolderPicker