forked from robinrodricks/FluentFTP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f612b63
commit 4dfab36
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System; | ||
using System.Text.RegularExpressions; | ||
using System.Collections.Generic; | ||
using System.Security.Authentication; | ||
using FluentFTP; | ||
using FluentFTP.Servers; | ||
#if (CORE || NETFX) | ||
using System.Threading; | ||
#endif | ||
#if ASYNC | ||
using System.Threading.Tasks; | ||
#endif | ||
|
||
namespace FluentFTP.Servers.Handlers { | ||
|
||
/// <summary> | ||
/// Server-specific handling for Titan FTP servers | ||
/// </summary> | ||
public class TitanFtpServer : FtpBaseServer { | ||
|
||
/// <summary> | ||
/// Return the FtpServer enum value corresponding to your server, or Unknown if its a custom implementation. | ||
/// </summary> | ||
public override FtpServer ToEnum() { | ||
return FtpServer.TitanFTP; | ||
} | ||
|
||
/// <summary> | ||
/// Return true if your server is detected by the given FTP server welcome message. | ||
/// </summary> | ||
public override bool DetectByWelcome(string message) { | ||
|
||
// Detect Pure-FTPd server | ||
// Welcome message: "220 Titan FTP Server 10.01.1740 Ready" | ||
if (message.Contains("Titan FTP")) { | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
} | ||
} |