swing - File Change Detector In Java ( 95% implemented but require help in one case) -


my project : file change detector: input application group of directories , files. when application runs first time summarize names , sizes of files. on subsequent runs should report

  1. name of files have been deleted since last run
  2. new files created since last run
  3. files size have grown more x% and
  4. files size have reduced more x%.

i have implemented java program scans user selected folder via jfilechooser , performs functionality .

but problem is, if user creates 2 files same name in different subfolder of "selected" main problem , leads ambiguous condition , hence project fails.

how differentiate 2 files ie 1 in c:\main\subfolder1\a.txt , c:\main\subfolder2\a.txt....(both have same size , created on same time)

store path of file well. after all, realized 2 files same name can exist in different directories being different files.

either that, or if want disregard directory, should enumerate them if encounter more 1 entry same name.

the filechooser returns full path:

 string path = chooser.getselectedfile().tostring(); 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -