Hi @JackLacava ,
You are correct we were missing the dlls (XF\WinSCPnet.dll; C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.IO.Compression.dll; System.IO.Compression.FileSystem.dll) to include the Zip file class. We have used the library System.IO.Compression only. Zipfile class won't give you suggestions but will work as expected,
Dim ZipFileName As String = "Test.zip"
Dim ZipFilePath As String = BRApi.FileSystem.GetFileShareFolder(si, FileShareFolderTypes.ApplicationRoot, Nothing) & "\" & si.AppName.Replace(" ", String.Empty) & "\Groups\" & ZipFileName
ZipFile.CreateFromDirectory(exportFolderPath, ZipFilePath). this will store the the files under the folder path, exportFolderPath on the filepath, ZipFilePath.
Dim ZipFileName As String = "test.zip" Dim folderLocation As String = FileShareFolderHelper.GetDataManagementExportUsernameFolderForApp(si, True, configSettings.FileShareRootFolder, si.AppName) Dim ZipFilePath As String = folderLocation & "\" & ZipFileName XFZip.Zip(ZipFilePath, folderLocation)
ZipFile is not working for me. I am working on OneStream on cloud. I think they do not have this library. But I found that they use their own method to zip files.
This is the poorest documentation I have seen ever. I spent hours to find this.
Hey Jarek, I'm sorry you had to suffer through this - we know documentation coverage is not where we'd like them to be, which is partially why this forum exists. Generally speaking, for anything related to "how do I do this thing in Cloud", feel free to chat with Support - chances are someone else had your problems before, and they are happy to make the necessary tweaks. As you can imagine, for security purposes, in Cloud a lot of stuff is not available until you tell us that you really really need it. This is probably one of them.