Basically what i want is to delete the previouslog file.
It's a tiny part of a class which is called at last to delete
the log file after taking backup.
I am using spring to load the context and all.
In this i am getting the location of log file to be deleted from log.properties file.
But i am not getting desired result. I mean the files are not
getting deleted. I think there is something wrong with calling listFiles().
Can you please point out where i am doing mistake?
And yes Rob i think file is still in use because of context.
But in that case it should throw the exception. am i right?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35432
9
posted
0
But in that case it should throw the exception. am i right?
No. Making assumptions about which method might throw an exception in which situation is not a good basis for writing code; that's what the javadocs are for - they tell you when exceptions are thrown. In this case, you need to go by the return value of the method call.
kayanaat sidiqui
Ranch Hand
Joined: Sep 04, 2008
Posts: 122
posted
0
Hi all,
I saw my code andcame to knowthat filethat iwant to delete is still in use.
But any how i want to delete that files.
So is there any way to delete files forcefully?
kayanaat sidiqui
Ranch Hand
Joined: Sep 04, 2008
Posts: 122
posted
0
Hi all,
I saw my code andcame to knowthat filethat iwant to delete is still in use.
But any how i want to delete that files.
So is there any way to delete files forcefully?
kayanaat sidiqui
Ranch Hand
Joined: Sep 04, 2008
Posts: 122
posted
0
Hi all,
Well i saw my code and came to know that file to which i want to delete,
is still in use.
Ok. But any howi want to delete these files.
So is there anyway to delete files forcefully?