Skip to content

Commit

Permalink
* Initial large cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
artiomchi committed Sep 16, 2017
1 parent a900270 commit 5a6d837
Show file tree
Hide file tree
Showing 25 changed files with 159 additions and 423 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[*.cs]
indent_style = tab
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ API Reference.shfbproj_jp
Help

*.sublime-workspace
*.user
*.suo
*.nupkg
.gitignore
Expand Down
34 changes: 34 additions & 0 deletions FluentFTP.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentFTP", "FluentFTP\FluentFTP.csproj", "{117F9BA2-711B-4C71-92EC-002220B157DD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples", "FluentFTP.Examples\Examples.csproj", "{49B11591-C942-479F-A864-AB2738E50EF0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "FluentFTP.Tests\Tests.csproj", "{28AA032E-CACF-4C07-BF12-C4FBE71BC8BD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{117F9BA2-711B-4C71-92EC-002220B157DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{117F9BA2-711B-4C71-92EC-002220B157DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{117F9BA2-711B-4C71-92EC-002220B157DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{117F9BA2-711B-4C71-92EC-002220B157DD}.Release|Any CPU.Build.0 = Release|Any CPU
{49B11591-C942-479F-A864-AB2738E50EF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49B11591-C942-479F-A864-AB2738E50EF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49B11591-C942-479F-A864-AB2738E50EF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49B11591-C942-479F-A864-AB2738E50EF0}.Release|Any CPU.Build.0 = Release|Any CPU
{28AA032E-CACF-4C07-BF12-C4FBE71BC8BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28AA032E-CACF-4C07-BF12-C4FBE71BC8BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28AA032E-CACF-4C07-BF12-C4FBE71BC8BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{28AA032E-CACF-4C07-BF12-C4FBE71BC8BD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
8 changes: 4 additions & 4 deletions FluentFTP/Client/FtpClient_Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#if (CORE || NETFX)
using System.Threading;
#endif
#if NETFX45
#if NET45
using System.Threading.Tasks;
#endif

Expand Down Expand Up @@ -892,7 +892,7 @@ public FtpReply EndExecute(IAsyncResult ar) {
}
#endif

#if NETFX45
#if NET45
/// <summary>
/// Performs an asynchronous execution of the specified command
/// </summary>
Expand Down Expand Up @@ -1233,7 +1233,7 @@ public void EndConnect(IAsyncResult ar) {
}
#endif

#if NETFX45
#if NET45
/// <summary>
/// Connects to the server asynchronously
/// </summary>
Expand Down Expand Up @@ -1340,7 +1340,7 @@ public void EndDisconnect(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Disconnects from the server asynchronously
/// </summary>
Expand Down
22 changes: 11 additions & 11 deletions FluentFTP/Client/FtpClient_Hash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#if (CORE || NETFX)
using System.Threading;
#endif
#if NETFX45
#if NET45
using System.Threading.Tasks;
#endif

Expand Down Expand Up @@ -151,7 +151,7 @@ public FtpHashAlgorithm EndGetHashAlgorithm(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Gets the currently selected hash algorithm for the HASH command asynchronously.
/// </summary>
Expand Down Expand Up @@ -258,7 +258,7 @@ public void EndSetHashAlgorithm(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Sets the hash algorithm on the server to be used with the HASH command asynchronously.
/// </summary>
Expand Down Expand Up @@ -398,7 +398,7 @@ public FtpHash EndGetHash(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Gets the hash of an object on the server using the currently selected hash algorithm asynchronously.
/// </summary>
Expand Down Expand Up @@ -538,7 +538,7 @@ public FtpHash EndGetChecksum(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Retrieves a checksum of the given file using a checksum method that the server supports, if any.
/// </summary>
Expand Down Expand Up @@ -635,7 +635,7 @@ public string EndGetMD5(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Gets the MD5 hash of the specified file using MD5 asynchronously. This is a non-standard extension
/// to the protocol and may or may not work. A FtpCommandException will be
Expand Down Expand Up @@ -713,7 +713,7 @@ public string EndGetXCRC(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Gets the CRC hash of the specified file using XCRC asynchronously. This is a non-standard extension
/// to the protocol and may or may not work. A FtpCommandException will be
Expand Down Expand Up @@ -791,7 +791,7 @@ public string EndGetXMD5(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Gets the MD5 hash of the specified file using XMD5 asynchronously. This is a non-standard extension
/// to the protocol and may or may not work. A FtpCommandException will be
Expand Down Expand Up @@ -869,7 +869,7 @@ public string EndGetXSHA1(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Gets the SHA-1 hash of the specified file using XSHA1 asynchronously. This is a non-standard extension
/// to the protocol and may or may not work. A FtpCommandException will be
Expand Down Expand Up @@ -949,7 +949,7 @@ public string EndGetXSHA256(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Gets the SHA-256 hash of the specified file using XSHA256 asynchronously. This is a non-standard extension
/// to the protocol and may or may not work. A FtpCommandException will be
Expand Down Expand Up @@ -1029,7 +1029,7 @@ public string EndGetXSHA512(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Gets the SHA-512 hash of the specified file using XSHA512 asynchronously. This is a non-standard extension
/// to the protocol and may or may not work. A FtpCommandException will be
Expand Down
22 changes: 11 additions & 11 deletions FluentFTP/Client/FtpClient_HighLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#if (CORE || NETFX)
using System.Threading;
#endif
#if (CORE || NETFX45)
#if (CORE || NET45)
using System.Threading.Tasks;
#endif

Expand Down Expand Up @@ -288,7 +288,7 @@ public int UploadFiles(IEnumerable<FileInfo> localFiles, string remoteDir, FtpEx
return UploadFiles(localFiles.Select(f => f.FullName), remoteDir, existsMode, createRemoteDir, verifyOptions, errorHandling);
}

#if NETFX45
#if NET45
/// <summary>
/// Uploads the given file paths to a single folder on the server asynchronously.
/// All files are placed directly into the given folder regardless of their path on the local filesystem.
Expand Down Expand Up @@ -548,7 +548,7 @@ private void PurgeSuccessfulDownloads(IEnumerable<string> localFiles) {
}
}

#if NETFX45
#if NET45
/// <summary>
/// Downloads the specified files into a local single directory.
/// High-level API that takes care of various edge cases internally.
Expand Down Expand Up @@ -706,7 +706,7 @@ public bool UploadFile(string localPath, string remotePath, FtpExists existsMode
return UploadFileFromFile(localPath, remotePath, createRemoteDir, existsMode, false, false, verifyOptions);
}

#if NETFX45
#if NET45

/// <summary>
/// Uploads the specified file directly onto the server asynchronously.
Expand Down Expand Up @@ -811,7 +811,7 @@ private bool UploadFileFromFile(string localPath, string remotePath, bool create
return uploadSuccess && verified;
}

#if NETFX45
#if NET45
private async Task<bool> UploadFileFromFileAsync(string localPath, string remotePath, bool createRemoteDir, FtpExists existsMode,
bool fileExists, bool fileExistsKnown, FtpVerify verifyOptions, CancellationToken token) {

Expand Down Expand Up @@ -908,7 +908,7 @@ public bool Upload(byte[] fileData, string remotePath, FtpExists existsMode = Ft
}


#if NETFX45
#if NET45

/// <summary>
/// Uploads the specified stream as a file onto the server asynchronously.
Expand Down Expand Up @@ -1159,7 +1159,7 @@ private bool UploadFileInternal(Stream fileData, string remotePath, bool createR
}
}

#if NETFX45
#if NET45
/// <summary>
/// Upload the given stream to the server as a new file asynchronously. Overwrites the file if it exists.
/// Writes data in chunks. Retries if server disconnects midway.
Expand Down Expand Up @@ -1414,7 +1414,7 @@ private bool DownloadFileToFile(string localPath, string remotePath, bool overwr
return downloadSuccess && verified;
}

#if NETFX45
#if NET45
/// <summary>
/// Downloads the specified file onto the local file system asynchronously.
/// High-level API that takes care of various edge cases internally.
Expand Down Expand Up @@ -1586,7 +1586,7 @@ public bool Download(out byte[] outBytes, string remotePath) {
return ok;
}

#if NETFX45
#if NET45
/// <summary>
/// Downloads the specified file into the specified stream asynchronously .
/// High-level API that takes care of various edge cases internally.
Expand Down Expand Up @@ -1816,7 +1816,7 @@ private bool DownloadFileInternal(string remotePath, Stream outStream) {
}
}

#if NETFX45
#if NET45
/// <summary>
/// Download a file from the server and write the data into the given stream asynchronously.
/// Reads data in chunks. Retries if server disconnects midway.
Expand Down Expand Up @@ -1991,7 +1991,7 @@ private bool VerifyTransfer(string localPath, string remotePath) {
return true;
}

#if NETFX45
#if NET45
private async Task<bool> VerifyTransferAsync(string localPath, string remotePath) {

// verify args
Expand Down
8 changes: 4 additions & 4 deletions FluentFTP/Client/FtpClient_Listing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#if (CORE || NETFX)
using System.Threading;
#endif
#if NETFX45
#if NET45
using System.Threading.Tasks;
#endif

Expand Down Expand Up @@ -288,7 +288,7 @@ public FtpListItem EndGetObjectInfo(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Return information about a remote file system object asynchronously.
/// </summary>
Expand Down Expand Up @@ -635,7 +635,7 @@ public FtpListItem[] EndGetListing(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Gets a file listing from the server asynchronously. Each <see cref="FtpListItem"/> object returned
/// contains information about the file that was able to be retrieved.
Expand Down Expand Up @@ -794,7 +794,7 @@ public string[] EndGetNameListing(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Returns a file/directory listing using the NLST command asynchronously
/// </summary>
Expand Down
10 changes: 5 additions & 5 deletions FluentFTP/Client/FtpClient_LowLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#if (CORE || NETFX)
using System.Threading;
#endif
#if NETFX45
#if NET45
using System.Threading.Tasks;
#endif

Expand Down Expand Up @@ -609,7 +609,7 @@ public Stream EndOpenRead(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Opens the specified file for reading asynchronously
/// </summary>
Expand Down Expand Up @@ -783,7 +783,7 @@ public Stream EndOpenWrite(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Opens the specified file for writing. Please call GetReply() after you have successfully transfered the file to read the "OK" command sent by the server and prevent stale data on the socket. asynchronously
/// </summary>
Expand Down Expand Up @@ -931,7 +931,7 @@ public Stream EndOpenAppend(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Opens the specified file to be appended asynchronously
/// </summary>
Expand Down Expand Up @@ -1037,7 +1037,7 @@ protected void EndSetDataType(IAsyncResult ar) {
}

#endif
#if NETFX45
#if NET45
/// <summary>
/// Sets the data type of information sent over the data stream asynchronously
/// </summary>
Expand Down
Loading

0 comments on commit 5a6d837

Please sign in to comment.