I know the differences between them by reading some related texts. But I'm curious that why getCanonicalPath() throws a validation exception and getAbsolutePath() does not throw?
getCanonicalPath()
getAbsolutePath()
But I'm curious that why getCanonicalPath() throws a validation exception and getAbsolutePath() does not throw?
It says why in the documentation for getCanonicalPath :
getCanonicalPath
IOException - If an I / O error occurs, which is possible because a file system request may be required to build a canonical path
IOException
Source: https://habr.com/ru/post/897089/More articles:Frustum plane calculus - 3dHow to delete the corresponding line and the previous? - unixRadio buttons and checkboxes for true / false / null options - user-interfaceHow to set android: layout_weight and android: layout_width in code? - androidAndroid, how to place two relative layouts, one to the left and one to the right of the screen? - androidAndroid: MediaRecorder @ Native code - androidhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/897091/how-to-check-for-version-of-app-and-request-users-to-update&usg=ALkJrhjV1Ea6KEJYAOWzQ-pq8kmJaOgJkghttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/897092/cant-get-eclipse-watch-points-to-work&usg=ALkJrhhR6RYIbEpVOXE_jQzTvgWEVxhrogFull destination / current url within the game? - javaWhy can't I get focus in NSPanel if the "Title Bar" is not installed? - objective-cAll Articles