aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs
diff options
context:
space:
mode:
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.cs40
1 files changed, 35 insertions, 5 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 6673a5ae3..e7f9772ff 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs
@@ -167,7 +167,10 @@ namespace Tango.FSE.UI.FileSystem
Priority = QueuePriority.Low
});
- _webRtcTransporter = new BasicTransporter(new WebRtcTransportAdapter(_machineProvider.MachineOperator, WebRtcTransportAdapterMode.Active, WEB_RTC_CHANNEL_NAME));
+ _webRtcTransporter = new BasicTransporter(new WebRtcTransportAdapter(_machineProvider.MachineOperator, WebRtcTransportAdapterMode.Active, WEB_RTC_CHANNEL_NAME)
+ {
+ EnableCompression = _machineProvider.MachineOperator.CompressionEnabled,
+ });
_webRtcTransporter.UseKeepAlive = false;
_webRtcTransporter.ComponentName = "File System Active WebRTC Transporter";
await _webRtcTransporter.Connect();
@@ -272,11 +275,12 @@ namespace Tango.FSE.UI.FileSystem
/// <summary>
/// Downloads the specified file or folder item.
/// </summary>
- /// <param name="item">The file or folder.</param>
+ /// <param name="remotePath">The remote file or folder.</param>
+ /// <param name="isRemotePathFile">Indicates whether the remote path is a file.</param>
/// <param name="localTargetFolderOrFile">The local target folder or file.</param>
- /// <param name="isSingleFile">Indicates whether the localTargetFolder is a file.</param>
+ /// <param name="isLocalTargetFile">Indicates whether the localTargetFolder is a file.</param>
/// <returns></returns>
- public Task<FileSystemHandler> Download(FileSystemItem item, String localTargetFolderOrFile, bool isSingleFile = false)
+ public Task<FileSystemHandler> Download(FileSystemItem item, String localTargetFolderOrFile, bool isLocalTargetFile = false)
{
AuthenticationProvider.ThrowIfNoPermission(Permissions.FSE_PPCFileSystemRead);
@@ -289,7 +293,7 @@ namespace Tango.FSE.UI.FileSystem
FileSystemHandler handler = null;
- if (isSingleFile)
+ if (isLocalTargetFile)
{
destination = localTargetFolderOrFile;
}
@@ -537,6 +541,32 @@ namespace Tango.FSE.UI.FileSystem
}
/// <summary>
+ /// Downloads the specified file or folder item.
+ /// </summary>
+ /// <param name="remotePath">The remote file or folder.</param>
+ /// <param name="isRemotePathFile">Indicates whether the remote path is a file.</param>
+ /// <param name="localTargetFolderOrFile">The local target folder or file.</param>
+ /// <param name="isLocalTargetFile">Indicates whether the localTargetFolder is a file.</param>
+ /// <returns></returns>
+ public Task<FileSystemHandler> Download(String remotePath, bool isRemotePathFile, String localTargetFolderOrFile, bool isLocalTargetFile = false)
+ {
+ FileSystemItem item = null;
+
+ if (isRemotePathFile)
+ {
+ item = new FileItem();
+ }
+ else
+ {
+ item = new FolderItem();
+ }
+
+ item.Path = remotePath;
+
+ return Download(item, localTargetFolderOrFile, isLocalTargetFile);
+ }
+
+ /// <summary>
/// Uploads the specified local file or folder.
/// </summary>
/// <param name="localSourcePath">The local source path.</param>