equal
deleted
inserted
replaced
25 |
25 |
26 package sun.nio.fs; |
26 package sun.nio.fs; |
27 |
27 |
28 import java.nio.file.attribute.*; |
28 import java.nio.file.attribute.*; |
29 import java.util.concurrent.TimeUnit; |
29 import java.util.concurrent.TimeUnit; |
30 import java.security.AccessController; |
|
31 import jdk.internal.misc.Unsafe; |
30 import jdk.internal.misc.Unsafe; |
32 import sun.security.action.GetPropertyAction; |
31 import sun.security.action.GetPropertyAction; |
33 |
32 |
34 import static sun.nio.fs.WindowsNativeDispatcher.*; |
33 import static sun.nio.fs.WindowsNativeDispatcher.*; |
35 import static sun.nio.fs.WindowsConstants.*; |
34 import static sun.nio.fs.WindowsConstants.*; |
113 private static final long WINDOWS_EPOCH_IN_MICROSECONDS = -11644473600000000L; |
112 private static final long WINDOWS_EPOCH_IN_MICROSECONDS = -11644473600000000L; |
114 |
113 |
115 // indicates if accurate metadata is required (interesting on NTFS only) |
114 // indicates if accurate metadata is required (interesting on NTFS only) |
116 private static final boolean ensureAccurateMetadata; |
115 private static final boolean ensureAccurateMetadata; |
117 static { |
116 static { |
118 String propValue = AccessController.doPrivileged( |
117 String propValue = GetPropertyAction |
119 new GetPropertyAction("sun.nio.fs.ensureAccurateMetadata", "false")); |
118 .getProperty("sun.nio.fs.ensureAccurateMetadata", "false"); |
120 ensureAccurateMetadata = (propValue.length() == 0) ? |
119 ensureAccurateMetadata = (propValue.length() == 0) ? |
121 true : Boolean.valueOf(propValue); |
120 true : Boolean.valueOf(propValue); |
122 } |
121 } |
123 |
122 |
124 // attributes |
123 // attributes |