Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1036125 // zipSingleFile

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (9413L) is out of date.

static File zipSingleFile(File f) {
  assertIsFile(f);
  File zipFile = appendToFileName(f, ".zip");
  if (isValidZipFile(zipFile)) ret zipFile; // no overwrite if valid zip
  temp var zipOut = newZipOutputStream(zipFile);
  addFileToZip(zipOut, f);
  ret zipFile;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): mowyntqkapby, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036125
Snippet name: zipSingleFile
Eternal ID of this version: #1036125/4
Text MD5: 28adf5f6dd3e6a61323b704e03f96510
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-11-15 13:03:43
Source code size: 273 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 60 / 90
Version history: 3 change(s)
Referenced in: [show references]