Originally posted by abiram kumar:
Sample code:
File f=new File(source);
for(int i=0;i<=file.length;i++)
file[i].delete();
What is the environment for you project? Here is what I faced a few months back , might be useful to you.
My code to delete was running fine in the development environment (Windows 2000) , but was failing in production environment (UNIX).
The reason is the source.When I trimmed this it worked file in UNIX also.FileSystem implementation are different for different filesystems and file are closely related to those.I think in case of a UNIX file , it takes the source as source and if the source
string has some spaces in the end , then the File object that you have created might not be a valid descriptor to a file in the filesystem.
In case of NT filesystem implementation they might be taking care of that.