guys i have got a problem in which i have to create a directory which keeps a text file which keeps the information about all the files. Like file created, last modified , type etc..
its not a big deal till i have to maintain this record of the static files(already present in the directory). But what happens when some new files are added, how do i check that the last modified thing. For the static files, initially i have set the class variable as zero and later the variable is compared with the last modified value. My question is what happens when a new file is added ? A new object is created every time a new file is added ?
I tried that way but its turning out to be highly tedious? Am i moving in the right direction? It has to be done in java
. In a real fix. Kindly help guys. I hope am clear with my doubt.
Thanks in advance!
Asked
Active
Viewed 72 times
0

gursahib.singh.sahni
- 1,559
- 3
- 26
- 51
-
1Please add an upper case letter at the start of sentences. Also use a capital for the word I, and abbreviations and acronyms like JEE or WAR. This makes it easier for people to understand and help. – Andrew Thompson Jul 08 '13 at 17:21
-
How is what you are doing different than what the OS does to keep info on files in a folder? Why not use the OS to look up files and dates and such? – Lee Meador Jul 08 '13 at 17:24
-
its an assignment sir -_- – gursahib.singh.sahni Jul 08 '13 at 17:25
-
and am not able to do it. I want to find a way out. CURIOSITY ! – gursahib.singh.sahni Jul 08 '13 at 17:27
-
am using watcher service API\ – gursahib.singh.sahni Jul 09 '13 at 04:18