При использовании File.mkdir и друзей я замечаю, что они не бросают исключения при отказе! К счастью, FindBugs указали это, и теперь мой код хотя бы проверяет возвращаемое значение, но я до сих пор не вижу возможности получить осмысленную информацию о том, почему вызов терпит неудачу!
Как узнать, почему вызовы этих файлов не срабатывают? Есть ли хорошая альтернатива или библиотека, которая справляется с этим?
Я сделал несколько поисков здесь, на SO и Google, и нашел удивительную небольшую информацию по этой теме.
[обновление] Я дал VFS попытку, и ее исключение больше не содержит полезной информации. Например, попытка переместить недавно удаленный каталог привела к Could not rename file "D:\path\to\fileA" to "file:///D:/path/do/fileB".
Нет упоминания о том, что fileA больше не существует.
[обновление] Бизнес-требования ограничивают меня только решениями JDK 1.6, поэтому JDK 1.7 отсутствует