HttpModeTargetPathExtension
using System;
using System.IO;
namespace Relativity.Transfer.Http.Extensions
{
internal static class HttpModeTargetPathExtension
{
public static string BuildTargetPath(this TransferPath path)
{
if (path == (TransferPath)null)
throw new ArgumentNullException("path");
if (path.Direction != TransferDirection.Download)
throw new ArgumentException();
if (path.SourcePath == null && path.TargetFileName == null)
throw new ArgumentException();
string fileName = Path.GetFileName(path.SourcePath);
string path2 = path.TargetFileName ?? fileName;
return Path.Combine(path.TargetPath, path2);
}
}
}