mirror of https://github.com/ogoun/Zero.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
1.0 KiB
24 lines
1.0 KiB
using ZeroLevel.Services.FileSystem;
|
|
|
|
namespace ZeroLevel.Network.FileTransfer
|
|
{
|
|
public static class FileClientFactory
|
|
{
|
|
public static IFileClient Create(string serverEndpoint, string baseFolder, ClientFolderNameMapper nameMapper = null)
|
|
{
|
|
return null;/* CreateFileServerClient(ExchangeTransportFactory.GetClient(serverEndpoint), baseFolder,
|
|
nameMapper ?? (c => FSUtils.FileNameCorrection($"{c.Endpoint.Address}_{c.Endpoint.Port}")), true);*/
|
|
}
|
|
|
|
public static IFileClient Create(ExClient client, string baseFolder, ClientFolderNameMapper nameMapper = null)
|
|
{
|
|
return CreateFileServerClient(client, baseFolder, nameMapper ?? (c => FSUtils.FileNameCorrection($"{c.Endpoint.Address}_{c.Endpoint.Port}")), false);
|
|
}
|
|
|
|
private static IFileClient CreateFileServerClient(ExClient client, string baseFolder, ClientFolderNameMapper nameMapper, bool disposeClient)
|
|
{
|
|
return new FileClient(client, baseFolder, nameMapper, disposeClient);
|
|
}
|
|
}
|
|
}
|