Ayfri
11/25/2022, 9:06 PMJoffrey
11/25/2022, 9:22 PMAyfri
11/25/2022, 9:23 PMJoffrey
11/25/2022, 9:23 PMJoffrey
11/25/2022, 9:23 PMAyfri
11/25/2022, 9:24 PMAyfri
11/25/2022, 9:24 PMAyfri
11/25/2022, 9:24 PMunzip
package in WSL, I get false directories, directories named data/test/functions/...
instead of a list of directoriesAyfri
11/25/2022, 9:25 PMPablichjenkov
11/25/2022, 9:32 PMjava.util.zip.ZipEntry
and java.util.zip.ZipOutputStream
from java.
Usage:
// Create
val directoryFile = File("DirectoryPath")
val zipFile = File(parentDirFile, ZipFileName)
if (zipFile.exists()) { // Refresh it if exist
zipFile.delete()
}
zipFile.createNewFile()
ZipUtil.zip(directoryFile.listFiles().toList(), zipFile.path)
Pablichjenkov
11/25/2022, 9:35 PMAyfri
11/25/2022, 9:41 PMException in thread "main" java.io.FileNotFoundException: test\data\minecraft\tags\blocks\op.json (The specified path could not be found)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
at ZipUtil.zipFile(ZipUtil.kt:76)
at ZipUtil.zipDirectory(ZipUtil.kt:65)
...
Ayfri
11/25/2022, 9:42 PMzip4j
it's still an invalid zip file for MinecraftPablichjenkov
11/25/2022, 9:43 PMAyfri
11/25/2022, 9:44 PMPablichjenkov
11/25/2022, 9:47 PMjava.io.FileInputStream.open0(Native Method)
could fail to find a file.
Type:
java.io.FileNotFoundException: (The specified path could not be found)
Pablichjenkov
11/25/2022, 9:48 PMop.json
a file or a directory?Ayfri
11/25/2022, 9:48 PMPablichjenkov
11/25/2022, 9:52 PMval directoryFile = File("../PathOfTheOp-JsonParent")
Ayfri
11/25/2022, 9:54 PMPablichjenkov
11/25/2022, 10:15 PMAyfri
11/26/2022, 3:01 PMJoffrey
11/26/2022, 6:07 PMJoffrey
11/26/2022, 6:10 PMandylamax
11/27/2022, 8:40 AMJoffrey
11/27/2022, 11:56 AMandylamax
11/27/2022, 12:08 PMJoffrey
11/27/2022, 12:14 PMAyfri
11/27/2022, 8:35 PM