-
Java getPath(), getAbsolutePath(), getCanonicalPath()
getPath() : 입력된 경로 그대로 리턴
getAbsolutePath() : 입력된 절대 경로 리턴
getCanonicalPath() : 불필요한 것 등이 정리된 절대 경로 리턴입력
./example/../example/file1
getPath()
위 내용 그대로
getAbsolutePath()
/home/user1/example/../example/file1
getCanonicalPath()
/home/user1/example/file1
'Java' 카테고리의 다른 글
반복문 for 흐름 Ex (0) 2022.11.30 InputStream to Byte Array, ByteBuffer (0) 2022.08.11 RxJava subscribeOn, observeOn (0) 2022.08.07 Callable, Runnable 차이 (0) 2022.08.07 Thread IO UI 혼용 문제 증상 (0) 2022.08.07 RxJava HttpUrlConnection (0) 2022.08.07 RxJava 스케쥴러(Scheduler) 종류 (0) 2022.08.07 HttpURLConnection (0) 2022.08.07