My code for creating a temp file kept inside the jar file is working fine
InputStream is=Main.class.getClass().getResourceAsStream("/temp/test.txt");
File dstfile=File.createTempFile("test", ".txt");
FileOutputStream fos = new FileOutputStream(dstfile);
int b;
while((b = is.read()) != -1)
{
fos.write(b);
}
fos.close();
In the same manner, I need to create a temp directory with all the files inside it. To do this could anyone please tell me what do I modify in my above code.
Message was edited by:
Simmy