public async Task <IStorageItem> Copy(IStorageProjectionFolder folder) { StorageProjectionFolder projectionFolder = new StorageProjectionFolder() { PreviewImage = PreviewImage, Parent = folder, Path = folder.Path }; foreach (var item in Folders) { IFileStorageFolder newFolder = await item.Copy(folder) as IFileStorageFolder; if (newFolder == null) { throw new NullReferenceException("Did not get folder after copy"); } projectionFolder.Folders.Add(new StorageFolder() { DataContext = newFolder }); } return(projectionFolder); }
public async Task <IStorageFolder> CreateFolder(string name) { var newFolder = new StorageProjectionFolder() { Name = name, Parent = this, PreviewImage = PreviewImage, Path = String.Concat("{0}\\{1}", Path, Name) }; foreach (var item in Folders) { newFolder.Folders.Add(await item.CreateFolder2(name)); } return(newFolder); }