renameTo() API in file will be true if and only if the renaming is success. Else it will be false. So, When it fails, is there a way to check why it failed, say like some error codes as Permission denied, file not exists() sort of things. I have a application which does not renames the files if it is in the ROOT(/) direcotry. The platform ix UNIX.