{"version":"1.0","image_url":"https://cdn.blog.st-hatena.com/images/theme/og-image-1500.png","title":"Java \u3067 touch \u3059\u308b","provider_name":"Hatena Blog","published":"2020-10-18 09:00:00","type":"rich","blog_title":"A Memorandum","author_name":"Naotsugu","description":"\u30d5\u30a1\u30a4\u30eb\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u5909\u3048\u308b\u306b\u306f Files.setLastModifiedTime() \u304c\u4f7f\u3048\u308b\u3002 public static void touch(final Path path) throws IOException { if (Files.exists(path)) { Files.setLastModifiedTime(path, FileTime.from(Instant.now())); } else { Files.createFile(path); } } \u307e\u305f\u306f\u3001File.setLastModified() \u3082\u53ef\u80fd\u3002 public static void touch(F\u2026","provider_url":"https://hatena.blog","width":"100%","blog_url":"https://blog1.mammb.com/","url":"https://blog1.mammb.com/entry/2020/10/18/090000","categories":["Java"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog1.mammb.com%2Fentry%2F2020%2F10%2F18%2F090000\" title=\"Java \u3067 touch \u3059\u308b - A Memorandum\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","author_url":"https://blog.hatena.ne.jp/Naotsugu/"}