Libraryless. Click here for Pure Java version (9855L/57K).
// Name of base dir (dir all files in zip are in) // e.g. "myDir" or "myDir/subDir" // Returns "" when no common base dir sS baseDirInZip(File zip) { S prefix = commonPrefix(listZip(zip)); ret takeFirst(prefix, indexOf(prefix, '/')); }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035263 |
| Snippet name: | baseDirInZip |
| Eternal ID of this version: | #1035263/1 |
| Text MD5: | 53dc245a1784b02efa25d6658a616e6d |
| Transpilation MD5: | 64f2b6406327ea7b184c93ed9bb50856 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-04-28 15:16:48 |
| Source code size: | 245 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 383 / 488 |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |