I've been trying to create files inside some directories but haven't been able to figure it out.
The point is to create text files inside package dir
: com.resources.files
but my idea doesn't work.
public boolean archiveFile() {
//
InputStream str = this.getClass().getResourceAsStream("/com/resources/files/"+Filename.txt
boolean bol = false;
file = new File( str.toString() );
if(!file.exists()) {
try {
file.createNewFile();
bol = true;
} catch (Exception e) {
e.printStackTrace();
}// try-catch
}else {
bol = false;
} // if - else
return bol;
}// archiveFile