< prev index next >

src/java.base/windows/classes/sun/nio/fs/WindowsFileAttributes.java

Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD


  99      *   TCHAR cAlternateFileName[14];
 100      * } WIN32_FIND_DATA;
 101      */
 102     private static final short SIZEOF_FIND_DATA = 592;
 103     private static final short OFFSETOF_FIND_DATA_ATTRIBUTES = 0;
 104     private static final short OFFSETOF_FIND_DATA_CREATETIME = 4;
 105     private static final short OFFSETOF_FIND_DATA_LASTACCESSTIME = 12;
 106     private static final short OFFSETOF_FIND_DATA_LASTWRITETIME = 20;
 107     private static final short OFFSETOF_FIND_DATA_SIZEHIGH = 28;
 108     private static final short OFFSETOF_FIND_DATA_SIZELOW = 32;
 109     private static final short OFFSETOF_FIND_DATA_RESERVED0 = 36;
 110 
 111     // used to adjust values between Windows and java epoch
 112     private static final long WINDOWS_EPOCH_IN_MICROSECONDS = -11644473600000000L;
 113 
 114     // indicates if accurate metadata is required (interesting on NTFS only)
 115     private static final boolean ensureAccurateMetadata;
 116     static {
 117         String propValue = GetPropertyAction.privilegedGetProperty(
 118             "sun.nio.fs.ensureAccurateMetadata", "false");
 119         ensureAccurateMetadata = (propValue.length() == 0) ?
 120             true : Boolean.valueOf(propValue);
 121     }
 122 
 123     // attributes
 124     private final int fileAttrs;
 125     private final long creationTime;
 126     private final long lastAccessTime;
 127     private final long lastWriteTime;
 128     private final long size;
 129     private final int reparseTag;
 130 
 131     // additional attributes when using GetFileInformationByHandle
 132     private final int volSerialNumber;
 133     private final int fileIndexHigh;
 134     private final int fileIndexLow;
 135 
 136     /**
 137      * Convert 64-bit value representing the number of 100-nanosecond intervals
 138      * since January 1, 1601 to a FileTime.
 139      */
 140     static FileTime toFileTime(long time) {




  99      *   TCHAR cAlternateFileName[14];
 100      * } WIN32_FIND_DATA;
 101      */
 102     private static final short SIZEOF_FIND_DATA = 592;
 103     private static final short OFFSETOF_FIND_DATA_ATTRIBUTES = 0;
 104     private static final short OFFSETOF_FIND_DATA_CREATETIME = 4;
 105     private static final short OFFSETOF_FIND_DATA_LASTACCESSTIME = 12;
 106     private static final short OFFSETOF_FIND_DATA_LASTWRITETIME = 20;
 107     private static final short OFFSETOF_FIND_DATA_SIZEHIGH = 28;
 108     private static final short OFFSETOF_FIND_DATA_SIZELOW = 32;
 109     private static final short OFFSETOF_FIND_DATA_RESERVED0 = 36;
 110 
 111     // used to adjust values between Windows and java epoch
 112     private static final long WINDOWS_EPOCH_IN_MICROSECONDS = -11644473600000000L;
 113 
 114     // indicates if accurate metadata is required (interesting on NTFS only)
 115     private static final boolean ensureAccurateMetadata;
 116     static {
 117         String propValue = GetPropertyAction.privilegedGetProperty(
 118             "sun.nio.fs.ensureAccurateMetadata", "false");
 119         ensureAccurateMetadata = propValue.isEmpty() ? true : Boolean.parseBoolean(propValue);

 120     }
 121 
 122     // attributes
 123     private final int fileAttrs;
 124     private final long creationTime;
 125     private final long lastAccessTime;
 126     private final long lastWriteTime;
 127     private final long size;
 128     private final int reparseTag;
 129 
 130     // additional attributes when using GetFileInformationByHandle
 131     private final int volSerialNumber;
 132     private final int fileIndexHigh;
 133     private final int fileIndexLow;
 134 
 135     /**
 136      * Convert 64-bit value representing the number of 100-nanosecond intervals
 137      * since January 1, 1601 to a FileTime.
 138      */
 139     static FileTime toFileTime(long time) {


< prev index next >