private static string getDeploymentSource(DeploymentItem x, string outputDir)
 {
     var source = x.Path;
     if (!Path.IsPathRooted(source))
         source = Path.Combine(outputDir, source);
     return source;
 }
 private static void copyItem(DeploymentItem x, string outputDir)
 {
     var source = getDeploymentSource(x, outputDir);
     var destination = getDeploymentDestination(source, x, outputDir);
     if (source.Equals(destination))
         return;
     if (hasChanged(source, destination))
         File.Copy(source, destination, true);
 }
 private static string getDeploymentDestination(string source, DeploymentItem x, string outputDir)
 {
     var destination = outputDir;
     if (x.OutputDirectory != null)
     {
         if (Path.IsPathRooted(x.OutputDirectory))
             destination = x.OutputDirectory;
         else
             destination = Path.Combine(outputDir, x.OutputDirectory);
         if (!Directory.Exists(destination))
             Directory.CreateDirectory(destination);
     }
     return Path.Combine(destination, Path.GetFileName(source));
 }