< prev index next >

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

Print this page

        

*** 72,81 **** --- 72,82 ---- boolean deleteOnClose; boolean sparse; boolean overlapped; boolean sync; boolean dsync; + boolean direct; // non-standard boolean shareRead = true; boolean shareWrite = true; boolean shareDelete = true;
*** 119,128 **** --- 120,133 ---- } if (ExtendedOptions.NOSHARE_DELETE.matches(option)) { flags.shareDelete = false; continue; } + if (ExtendedOptions.DIRECT.matches(option)) { + flags.direct = true; + continue; + } if (option == null) throw new NullPointerException(); throw new UnsupportedOperationException(); } return flags;
*** 159,169 **** throw new IllegalArgumentException("READ + APPEND not allowed"); if (flags.append && flags.truncateExisting) throw new IllegalArgumentException("APPEND + TRUNCATE_EXISTING not allowed"); FileDescriptor fdObj = open(pathForWindows, pathToCheck, flags, pSecurityDescriptor); ! return FileChannelImpl.open(fdObj, pathForWindows, flags.read, flags.write, null); } /** * Open/creates file, returning AsynchronousFileChannel to access the file * --- 164,174 ---- throw new IllegalArgumentException("READ + APPEND not allowed"); if (flags.append && flags.truncateExisting) throw new IllegalArgumentException("APPEND + TRUNCATE_EXISTING not allowed"); FileDescriptor fdObj = open(pathForWindows, pathToCheck, flags, pSecurityDescriptor); ! return FileChannelImpl.open(fdObj, pathForWindows, flags.read, flags.write, flags.direct, null); } /** * Open/creates file, returning AsynchronousFileChannel to access the file *
*** 271,280 **** --- 276,287 ---- dwFlagsAndAttributes |= FILE_FLAG_WRITE_THROUGH; if (flags.overlapped) dwFlagsAndAttributes |= FILE_FLAG_OVERLAPPED; if (flags.deleteOnClose) dwFlagsAndAttributes |= FILE_FLAG_DELETE_ON_CLOSE; + if (flags.direct) + dwFlagsAndAttributes |= FILE_FLAG_NO_BUFFERING; // NOFOLLOW_LINKS and NOFOLLOW_REPARSEPOINT mean open reparse point boolean okayToFollowLinks = true; if (dwCreationDisposition != CREATE_NEW && (flags.noFollowLinks ||
< prev index next >