public  void exploreDirectory(File f,String path, int linesNumber) {

		//one file object is created with the directory path
		File directory =new File(path);

		BufferedWriter bw = null;
		//Check if the path exists
		if (!directory.exists()) {
			System.out.println("The path " + directory.getAbsolutePath() + " does not exist.");
			return;
		}
		//It checks if a directory
		if (!directory.isDirectory()) {
			System.out.println("The path " + directory.getAbsolutePath() + " is not a directory");
			return;
		}


		//get the content of the directory
		File[] lista = directory.listFiles();

		String read=path+"\\read.txt";
		String hour=new SimpleDateFormat("EEE, MMM d, yyyy hh:mm:ss a z").format(new Date());

		try {

			bw = new BufferedWriter(new FileWriter(read, true));
			bw.write("-------------------------------- " + hour + " ---------------------------------\n\n");
			bw.write("In the directory " + directory.getName().toUpperCase() + " have generated the following files \n\n");
			bw.flush();
			bw.close();

			

		} catch (IOException e) {
			e.printStackTrace();
		}

		//walking the directory and files are listed first


		for (File s : lista){
			if(s.isFile()){

				try {
					if (s.getName().equals("read.txt")) {}

					else{
						bw = new BufferedWriter(new FileWriter(path+"\\read.txt",true));
						bw.write(" 		* File Created ->  "+" "+ s.getName()+
								" ===> "+"Number of stars : "+linesNumber+" \n\n");
						bw.flush();
						bw.close();
					}
					
				}
				catch (IOException e) {
					e.printStackTrace();
				}

			}

		}

	}