< prev index next >

src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java

Print this page

        

*** 62,71 **** --- 62,72 ---- boolean create; boolean createNew; boolean deleteOnClose; boolean sync; boolean dsync; + boolean direct; static Flags toFlags(Set<? extends OpenOption> options) { Flags flags = new Flags(); for (OpenOption option: options) { if (option instanceof StandardOpenOption) {
*** 86,95 **** --- 87,102 ---- } if (option == LinkOption.NOFOLLOW_LINKS && O_NOFOLLOW != 0) { flags.noFollowLinks = true; continue; } + + if (ExtendedOptions.DIRECT.matches(option)) { + flags.direct = true; + continue; + } + if (option == null) throw new NullPointerException(); throw new UnsupportedOperationException(option + " not supported"); } return flags;
*** 132,142 **** throw new IllegalArgumentException("READ + APPEND not allowed"); if (flags.append && flags.truncateExisting) throw new IllegalArgumentException("APPEND + TRUNCATE_EXISTING not allowed"); FileDescriptor fdObj = open(dfd, path, pathForPermissionCheck, flags, mode); ! return FileChannelImpl.open(fdObj, path.toString(), flags.read, flags.write, null); } /** * Constructs a file channel by opening the given file. */ --- 139,149 ---- throw new IllegalArgumentException("READ + APPEND not allowed"); if (flags.append && flags.truncateExisting) throw new IllegalArgumentException("APPEND + TRUNCATE_EXISTING not allowed"); FileDescriptor fdObj = open(dfd, path, pathForPermissionCheck, flags, mode); ! return FileChannelImpl.open(fdObj, path.toString(), flags.read, flags.write, flags.direct, null); } /** * Constructs a file channel by opening the given file. */
< prev index next >