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-15 04:54:52 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-04-15 04:54:52 +0300
commit52813618e140c921ff653d9c227c35032207b495 (patch)
tree5eef9e6cf26475b5ba31e9359bfd2c38531debae /Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs
parent7100354b0059cddfcffa4931216f4b8087bd94b1 (diff)
downloadTango-52813618e140c921ff653d9c227c35032207b495.tar.gz
Tango-52813618e140c921ff653d9c227c35032207b495.zip
FSE Firmware FileSystem.
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.cs16
1 files changed, 12 insertions, 4 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 49dc35f72..6bc667b32 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs
@@ -268,11 +268,12 @@ namespace Tango.FSE.UI.FileSystem
/// Downloads the specified file or folder item.
/// </summary>
/// <param name="item">The file or folder.</param>
- /// <param name="localTargetFolder">The local target folder.</param>
+ /// <param name="localTargetFolderOrFile">The local target folder or file.</param>
+ /// <param name="isSingleFile">Indicates whether the localTargetFolder is a file.</param>
/// <returns></returns>
- public Task<FileSystemHandler> Download(FileSystemItem item, string localTargetFolder)
+ public Task<FileSystemHandler> Download(FileSystemItem item, String localTargetFolderOrFile, bool isSingleFile = false)
{
- LogManager.Log($"Downloading remote item '{item.Path}' to local path '{localTargetFolder}'...");
+ LogManager.Log($"Downloading remote item '{item.Path}' to local path '{localTargetFolderOrFile}'...");
String operationId = String.Empty;
String destination = String.Empty;
@@ -281,7 +282,14 @@ namespace Tango.FSE.UI.FileSystem
FileSystemHandler handler = null;
- destination = Path.Combine(localTargetFolder, item.Name);
+ if (isSingleFile)
+ {
+ destination = localTargetFolderOrFile;
+ }
+ else
+ {
+ destination = Path.Combine(localTargetFolderOrFile, item.Name);
+ }
handler = new FileSystemHandler(item.Type == FileSystemItemType.Folder ? FileSystemHandlerType.FolderDownload : FileSystemHandlerType.FileDownload, item, destination, async () =>
{