How to use the react-native-zip-archive.zipWithPassword function in react-native-zip-archive

To help you get started, we’ve selected a few react-native-zip-archive examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mockingbot / react-native-zip-archive / example / Example.js View on Github external
return unlink(filePath).then(() => {
        // password for the dropbox sample zip file
        const password = 'helloworld'

        return zipWithPassword(
          filePath.split('.').slice(0, -1).join('.'),
          filePath,
          password
        ).then((response) => {
          console.log('Successfully archived the folder')
          console.log(response)
        }).catch((err) => {
          console.log(err)
        })
      }).catch((err) => {
        console.log(err)