KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
While using File.mkdir , and friends I notice that they don't throw exceptions on failure! Thankfully FindBugs pointed this out and now my code at least checks the return value but I still see no way to get meaningful information about why the call fails! How do I find out why calls to these File methods fail? Is there a good alternative or library that handles this? I've done some searches here on SO and Google and found surprising little info on this topic. [update] I've given VFS a try and its exception don't have anymore useful information. For example trying to move a directory that had been recently deleted resulted in Could not rename file "D:\path\to\fileA" to "file:///D:/path/do/fileB". No mention that fileA no longer existed. [update] Business requirements limit me to JDK 1.6 solutions only, so JDK 1.7 is out
Tags (comma-separated)
Save Edits
Cancel