B4J Library SD: ZipLibrary

Discussion in 'B4J Libraries & Classes' started by Star-Dust, Mar 14, 2018.

  1. Star-Dust

    Star-Dust Expert Licensed User

    jSD_ZipLibray

    Author: Star-Dust
    Version: 1.02
    • SD_ZipLibray
      • Functions:
        • Class_Globals As String
        • Initialize As String
          Inizializza l'oggetto. Puoi aggiungere parametri a questo metodo,se necessario.
        • IsInitialized As Boolean
          Verifica se l'oggetto sia stato inizializzato.
        • Zip (FilesTxt As String(), FileZip As String)
        • unZip (FilesZip As String, OutPutFolder As String)
        • unZipList (FilesZip As String, OutPutFolder As String) As List
    ZIP
    Code:
    Dim ZL As SD_ZipLibray
     
    ZL.Initialize
    ZL.Zip(ListFiles,ZipFileName)


    UnZip
    Code:
    Dim UnZL As SD_ZipLibray
     
        UnZL.Initialize
        UnZL.unZip(ZipFileName,FolderDestination)


    N.B. When you choose the folder where to save the ZIP file, make sure it is a folder that you have write permission
     

    Attached Files:

    Last edited: Mar 10, 2019
  2. Peter Simpson

    Peter Simpson Expert Licensed User

    This is perfect for my next project.

    Thank you...
     
  3. Mashiane

    Mashiane Expert Licensed User

    Hi there, how can one turn off the logs on the console? Can you add such an option please?

    Thanks
     
  4. Star-Dust

    Star-Dust Expert Licensed User

    Done
     
    Mashiane likes this.
  5. Mashiane

    Mashiane Expert Licensed User

    @Star-Dust me find out that update is not b4J lib, please help...
     
  6. Star-Dust

    Star-Dust Expert Licensed User

    Sorry, I had put the version for Android. Now it's correct
     
  7. Mashiane

    Mashiane Expert Licensed User

    Thanks a lot!
     
  8. m4.s

    m4.s Member

    This is also just what I've been trying to find for use within my B4J project!

    However, in my case, I need to be able to ZIP one or more files in a source folder plus at least one of its sub-folders (with all its files); and then UnZIP both the root-level files and its sub-folder (inherently with all the files it contains) to another location.

    Example:

    Selected files for ZIPing
    C:\MyFolder\File1.xml
    C:\MyFolder\File2.png
    C:\MyFolder\MySubFolder (containing these 2 files: File3.doc and File4.pdf)


    UnZIPed to C:\aDiffFolder
    yielding ->
    C:\aDiffFolder\File1.xml
    C:\aDiffFolder\File2.png
    C:\aDiffFolder\MySubFolder\File3.doc
    C:\aDiffFolder\MySubFolder\File4.pdf​


    Further, if one or more of the extracted files and/or subfolders already exists, could it/they be overwritten with and without prompting?

    Would you be able to add such support to your library?
     
  9. Star-Dust

    Star-Dust Expert Licensed User

    The library will not receive updates for the moment, I have no time. I'm sorry.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice