CreateFolderQuery() 개인적인 메소드

private CreateFolderQuery ( ) : StorageFolderQueryResult
리턴 Windows.Storage.Search.StorageFolderQueryResult
예제 #1
0
        async public static void copyFolder(StorageFolder from, StorageFolder _to)
        {
            StorageFolder to = await _to.CreateFolderAsync(from.Name, CreationCollisionOption.OpenIfExists);
            IReadOnlyList<StorageFile> storageFiles = await from.GetFilesAsync();
            foreach (var storageFile in storageFiles)
            {
                await storageFile.CopyAsync(to, storageFile.Name, NameCollisionOption.ReplaceExisting);
            }

            //IReadOnlyList<StorageFolder> storageFolders = await from.GetFoldersAsync();
            var queryResult = from.CreateFolderQuery();
            IReadOnlyList<StorageFolder> storageFolders = await queryResult.GetFoldersAsync();
            foreach (var storageFolder in storageFolders)
            {
                copyFolder(storageFolder, to);
            }

        }
예제 #2
0
        async Task LoadImagesFromDisk(StorageFolder currentFolder)
        {
            if (currentFolder.Name == "Cloud")
            {
                return;
            }
            var subFolderQuery = currentFolder.CreateFolderQuery();
            var folders = await subFolderQuery.GetFoldersAsync();

            //Get the files out of the current folder
            await processImageFiles(currentFolder);

            //Find any sub folders
            foreach (var folder in folders)
            {
                await LoadImagesFromDisk(folder);
            }
        }