public void CopyItemTest() { ShellFileOperations.Copy(new ShellItem(TestCaseSources.LargeFile), ShellFolder.Desktop); var dest = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), Path.GetFileName(TestCaseSources.LargeFile)); Assert.That(File.Exists(dest), Is.True); File.Delete(dest); }
public void CopyItemsTest() { var l = Directory.EnumerateFiles(@"C:\Users\dahall\Downloads", "h*.zip").Select(s => new ShellItem(s)).ToList(); ShellFileOperations.Copy(l, ShellFolder.Desktop); foreach (var i in l) { var fn = Path.Combine(@"C:\Users\dahall\Desktop", i.Name); Assert.That(File.Exists(fn), Is.True); File.Delete(fn); } }
public void CopyItemsTest() { var l = Directory.EnumerateFiles(KNOWNFOLDERID.FOLDERID_Downloads.FullPath(), "h*.zip").Select(s => new ShellItem(s)).ToList(); ShellFileOperations.Copy(l, ShellFolder.Desktop); foreach (var i in l) { var fn = Path.Combine(ShellFolder.Desktop.FileSystemPath, i.Name); Assert.That(File.Exists(fn), Is.True); File.Delete(fn); } }
public void CopyItemTest() { ShellFileOperations.Copy(new ShellItem(@"C:\Users\dahall\Downloads\lubuntu-16.04.2-desktop-amd64.iso"), ShellFolder.Desktop); Assert.That(File.Exists(@"C:\Users\dahall\Desktop\lubuntu-16.04.2-desktop-amd64.iso"), Is.True); File.Delete(@"C:\Users\dahall\Desktop\lubuntu-16.04.2-desktop-amd64.iso"); }