|
@@ -5,6 +5,7 @@ using System;
|
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
using System.Text;
|
|
|
|
|
+using System.Threading;
|
|
|
using System.Threading.Tasks;
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
namespace VehicleControlSystem.Managers
|
|
namespace VehicleControlSystem.Managers
|
|
@@ -30,19 +31,19 @@ namespace VehicleControlSystem.Managers
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//192.168.127.188 Moxa 용성 IP
|
|
//192.168.127.188 Moxa 용성 IP
|
|
|
- public void UploadPhysicalCheckupLog()
|
|
|
|
|
|
|
+ public async Task UploadPhysicalCheckupLogAsync()
|
|
|
{
|
|
{
|
|
|
|
|
+ var token = new CancellationToken();
|
|
|
|
|
+
|
|
|
using ( var ftp = new FtpClient( "192.168.127.188") )
|
|
using ( var ftp = new FtpClient( "192.168.127.188") )
|
|
|
{
|
|
{
|
|
|
- ftp.Connect();
|
|
|
|
|
-
|
|
|
|
|
|
|
+ await ftp.ConnectAsync( token );
|
|
|
|
|
|
|
|
// upload a folder and all its files
|
|
// upload a folder and all its files
|
|
|
- ftp.UploadDirectory( @"C:\LOG\OHV\Vehicle\PhysicalCheckup\", @"/FTP_TEST", FtpFolderSyncMode.Update );
|
|
|
|
|
|
|
+ await ftp.UploadDirectoryAsync( @"C:\LOG\OHV\Vehicle\PhysicalCheckup\", @"/DriveInfo", FtpFolderSyncMode.Update );
|
|
|
|
|
|
|
|
// upload a folder and all its files, and delete extra files on the server
|
|
// upload a folder and all its files, and delete extra files on the server
|
|
|
//ftp.UploadDirectory( @"C:\website\assets\", @"/public_html/assets", FtpFolderSyncMode.Mirror );
|
|
//ftp.UploadDirectory( @"C:\website\assets\", @"/public_html/assets", FtpFolderSyncMode.Mirror );
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|