root / trunk / Pithos.Client.WPF / Utils / FileUtils.cs @ 306a6634
History | View | Annotate | Download (751 Bytes)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.Text; |
5 |
using System.IO; |
6 |
|
7 |
namespace Pithos.Client.WPF.Utils |
8 |
{ |
9 |
public static class FileUtils |
10 |
{ |
11 |
//actionType = true for copy, false for move |
12 |
public void FileCopyMove(string[] files, string targetDir, bool actionType) |
13 |
{ |
14 |
|
15 |
foreach (string file in files) |
16 |
{ |
17 |
if (System.IO.File.Exists(file)) |
18 |
{ |
19 |
System.IO.File.Copy(file, System.IO.Path.Combine(targetDir, System.IO.Path.GetFileName(file))); |
20 |
} |
21 |
else |
22 |
{ |
23 |
//Send to Errorlog |
24 |
} |
25 |
|
26 |
} |
27 |
} |
28 |
} |
29 |
} |