From 2c002f5844be2424e07e43b491526430a0b21931 Mon Sep 17 00:00:00 2001 From: sendaoYan Date: Sun, 16 Jun 2024 22:54:28 +0800 Subject: [PATCH] add function comment for supportBirthTimeOnLinux --- .../file/attribute/BasicFileAttributeView/CreationTime.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java b/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java index 7d36843f0e9e9..7281f0d9c212b 100644 --- a/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java +++ b/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java @@ -72,6 +72,10 @@ private static void setCreationTime(Path file, FileTime time) throws IOException view.setTimes(null, null, time); } + /** + * read the output of linux command `stat -c "%w" file`, if the output is "-", + * then the file system doesn't support birth time + */ public static boolean supportBirthTimeOnLinux(Path file) { try { String filePath = file.toAbsolutePath().toString();