How do you read file content on a folder, iam saying like that i want to return all the files on a folder that contains a specific word! Here is a method that return all the files with a specific exe But now i want to read the content behind all the files
File [] files= folder.listFiles((File f) -> f.getName().endsWith(ext) && f.length() / 1024 < kb);
FileWriter fw = new FileWriter("C://Users//Admin//Desktop//foldtest123");
BufferedWriter bw = new BufferedWriter(fw);
try (PrintWriter pw = new PrintWriter(bw)) {
pw.println("Ne folderin : " + folder.getName() + " keto fajlla kane plotesuar kushtin");
for (File files1: files) {
pw.println(fajllat1);
}
}
}