src/windows/classes/sun/nio/fs/WindowsChannelFactory.java
Print this page
rev 9260 : imported patch io-events-path
*** 23,48 ****
* questions.
*/
package sun.nio.fs;
! import java.nio.file.*;
! import java.nio.channels.*;
import java.io.FileDescriptor;
import java.io.IOException;
! import java.util.*;
!
! import com.sun.nio.file.ExtendedOpenOption;
import sun.nio.ch.FileChannelImpl;
import sun.nio.ch.ThreadPool;
import sun.nio.ch.WindowsAsynchronousFileChannelImpl;
- import sun.misc.SharedSecrets;
- import sun.misc.JavaIOFileDescriptorAccess;
! import static sun.nio.fs.WindowsNativeDispatcher.*;
! import static sun.nio.fs.WindowsConstants.*;
/**
* Factory to create FileChannels and AsynchronousFileChannels.
*/
--- 23,67 ----
* questions.
*/
package sun.nio.fs;
! import static sun.nio.fs.WindowsConstants.CREATE_NEW;
! import static sun.nio.fs.WindowsConstants.FILE_ATTRIBUTE_NORMAL;
! import static sun.nio.fs.WindowsConstants.FILE_FLAG_DELETE_ON_CLOSE;
! import static sun.nio.fs.WindowsConstants.FILE_FLAG_OPEN_REPARSE_POINT;
! import static sun.nio.fs.WindowsConstants.FILE_FLAG_OVERLAPPED;
! import static sun.nio.fs.WindowsConstants.FILE_FLAG_WRITE_THROUGH;
! import static sun.nio.fs.WindowsConstants.FILE_SHARE_DELETE;
! import static sun.nio.fs.WindowsConstants.FILE_SHARE_READ;
! import static sun.nio.fs.WindowsConstants.FILE_SHARE_WRITE;
! import static sun.nio.fs.WindowsConstants.GENERIC_READ;
! import static sun.nio.fs.WindowsConstants.GENERIC_WRITE;
! import static sun.nio.fs.WindowsConstants.OPEN_ALWAYS;
! import static sun.nio.fs.WindowsConstants.OPEN_EXISTING;
! import static sun.nio.fs.WindowsConstants.TRUNCATE_EXISTING;
! import static sun.nio.fs.WindowsNativeDispatcher.CloseHandle;
! import static sun.nio.fs.WindowsNativeDispatcher.CreateFile;
! import static sun.nio.fs.WindowsNativeDispatcher.DeviceIoControlSetSparse;
! import static sun.nio.fs.WindowsNativeDispatcher.SetEndOfFile;
!
import java.io.FileDescriptor;
import java.io.IOException;
! import java.nio.channels.AsynchronousFileChannel;
! import java.nio.channels.FileChannel;
! import java.nio.file.LinkOption;
! import java.nio.file.OpenOption;
! import java.nio.file.StandardOpenOption;
! import java.util.Set;
+ import sun.misc.JavaIOFileDescriptorAccess;
+ import sun.misc.SharedSecrets;
import sun.nio.ch.FileChannelImpl;
import sun.nio.ch.ThreadPool;
import sun.nio.ch.WindowsAsynchronousFileChannelImpl;
! import com.sun.nio.file.ExtendedOpenOption;
/**
* Factory to create FileChannels and AsynchronousFileChannels.
*/
*** 155,165 ****
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, flags.read, flags.write, flags.append, null);
}
/**
* Open/creates file, returning AsynchronousFileChannel to access the file
*
--- 174,184 ----
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.append, null);
}
/**
* Open/creates file, returning AsynchronousFileChannel to access the file
*