the strangest thing is if originPath is an absolute path then it will always fail. But if the originPath is relative then it works and returns expected value. How do I set it up to just check the absolute value?
String fullName = relativePath + name; Path originPath = Paths.get("", name); if (Files.exists(originPath)) { return ; }
https://stackoverflow.com/questions/66979402/java-files-exists-always-returns-false April 07, 2021 at 12:03PM
没有评论:
发表评论