< prev index next >

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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 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,175 ---- 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 *
< prev index next >