archive icon indicating copy to clipboard operation
archive copied to clipboard

Delete files in an archive

Open subinsv opened this issue 4 years ago • 1 comments

Is it possible to delete or replace an ArchiveFile inside Archive.

I tried this

 Archive archive = ZipDecoder().decodeBytes(data.buffer
                .asUint8List(data.offsetInBytes, data.lengthInBytes));
          
            archive.addFile(ArchiveFile(
              "path/file.xml",
              newFile.lengthInBytes,
              newFile.buffer.asUint8List(
                newFile.offsetInBytes,
                newFile.lengthInBytes,
              ),
            )..compress = false);

This creates a duplicate file instead of overwriting the existing file in path "path/file.xml".

subinsv avatar Jul 11 '20 10:07 subinsv

Any updates? Deleting files is very important for me

CodeDoctorDE avatar Apr 28 '23 16:04 CodeDoctorDE