Revision f5cdce9f trunk/Pithos.Client.WPF/Utils/FileUtils.cs
b/trunk/Pithos.Client.WPF/Utils/FileUtils.cs | ||
---|---|---|
9 | 9 |
public static class FileUtils |
10 | 10 |
{ |
11 | 11 |
//actionType = true for copy, false for move |
12 |
public void FileCopyMove(string[] files, string targetDir, bool actionType)
|
|
12 |
public static bool FileCopyMove(string[] files, string targetDir, bool actionType)
|
|
13 | 13 |
{ |
14 | 14 |
|
15 | 15 |
foreach (string file in files) |
... | ... | |
17 | 17 |
if (System.IO.File.Exists(file)) |
18 | 18 |
{ |
19 | 19 |
System.IO.File.Copy(file, System.IO.Path.Combine(targetDir, System.IO.Path.GetFileName(file))); |
20 |
|
|
21 |
return true; |
|
20 | 22 |
} |
21 | 23 |
else |
22 | 24 |
{ |
23 | 25 |
//Send to Errorlog |
26 |
return false; |
|
24 | 27 |
} |
25 | 28 |
|
26 | 29 |
} |
30 |
return true; |
|
27 | 31 |
} |
28 | 32 |
} |
29 | 33 |
} |
Also available in: Unified diff