aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-04-13 03:41:41 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-04-13 03:41:41 +0300
commit76ebe53d89a1b0cbf21d66dc9f26dc95cc7b3be9 (patch)
treed1043332c085a2624187b77b37c63a37505cdad2 /Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs
parentd26e810aa206bf850622ded5a0da76293cb12f13 (diff)
downloadTango-76ebe53d89a1b0cbf21d66dc9f26dc95cc7b3be9.tar.gz
Tango-76ebe53d89a1b0cbf21d66dc9f26dc95cc7b3be9.zip
FSE TUP
Diffstat (limited to 'Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs')
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs19
1 files changed, 16 insertions, 3 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs
index 3ab27fe1e..49dc35f72 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs
@@ -530,8 +530,21 @@ namespace Tango.FSE.UI.FileSystem
/// <exception cref="System.IO.FileNotFoundException">Could not locate the local file or directory to upload.</exception>
public Task<FileSystemHandler> Upload(String localSourcePath, FileSystemItem remoteFolder)
{
- String operationId = String.Empty;
String destination = Path.Combine(remoteFolder.Path, Path.GetFileName(localSourcePath));
+ return Upload(localSourcePath, destination);
+ }
+
+ /// <summary>
+ /// Uploads the specified local file or folder.
+ /// </summary>
+ /// <param name="localSourcePath">The local source path.</param>
+ /// <param name="remotePath">The remote destination path.</param>
+ /// <returns></returns>
+ /// <exception cref="System.IO.FileNotFoundException">Could not locate the local file or directory to upload.</exception>
+ public Task<FileSystemHandler> Upload(String localSourcePath, String remotePath)
+ {
+ String operationId = String.Empty;
+ String destination = remotePath;
bool isFolder = false;
bool aborted = false;
@@ -539,13 +552,13 @@ namespace Tango.FSE.UI.FileSystem
if (Directory.Exists(localSourcePath))
{
- LogManager.Log($"Uploading local folder '{localSourcePath}' to remote path '{remoteFolder.Path}'...");
+ LogManager.Log($"Uploading local folder '{localSourcePath}' to remote path '{destination}'...");
sourceItem = new FolderItem() { Path = localSourcePath };
isFolder = true;
}
else if (File.Exists(localSourcePath))
{
- LogManager.Log($"Uploading local file '{localSourcePath}' to remote path '{remoteFolder.Path}'...");
+ LogManager.Log($"Uploading local file '{localSourcePath}' to remote path '{destination}'...");
sourceItem = new FileItem() { Path = localSourcePath };
isFolder = false;
}