equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
24 */ |
24 */ |
25 |
25 |
26 package com.sun.nio.file; |
26 package com.sun.nio.file; |
27 |
27 |
28 import java.nio.file.OpenOption; |
28 import java.nio.file.OpenOption; |
29 import sun.nio.fs.ExtendedOptions; |
29 import jdk.internal.misc.FileSystemOption; |
30 |
30 |
31 /** |
31 /** |
32 * Defines <em>extended</em> open options supported on some platforms |
32 * Defines <em>extended</em> open options supported on some platforms |
33 * by Sun's provider implementation. |
33 * by Sun's provider implementation. |
34 * |
34 * |
37 |
37 |
38 public enum ExtendedOpenOption implements OpenOption { |
38 public enum ExtendedOpenOption implements OpenOption { |
39 /** |
39 /** |
40 * Prevent operations on the file that request read access. |
40 * Prevent operations on the file that request read access. |
41 */ |
41 */ |
42 NOSHARE_READ(ExtendedOptions.NOSHARE_READ), |
42 NOSHARE_READ(FileSystemOption.NOSHARE_READ), |
43 /** |
43 /** |
44 * Prevent operations on the file that request write access. |
44 * Prevent operations on the file that request write access. |
45 */ |
45 */ |
46 NOSHARE_WRITE(ExtendedOptions.NOSHARE_WRITE), |
46 NOSHARE_WRITE(FileSystemOption.NOSHARE_WRITE), |
47 /** |
47 /** |
48 * Prevent operations on the file that request delete access. |
48 * Prevent operations on the file that request delete access. |
49 */ |
49 */ |
50 NOSHARE_DELETE(ExtendedOptions.NOSHARE_DELETE), |
50 NOSHARE_DELETE(FileSystemOption.NOSHARE_DELETE), |
51 |
51 |
52 /** |
52 /** |
53 * Requires that direct I/O be used for read or write access. |
53 * Requires that direct I/O be used for read or write access. |
54 * Attempting to open a file with this option set will result in |
54 * Attempting to open a file with this option set will result in |
55 * an {@code UnsupportedOperationException} if the operating system or |
55 * an {@code UnsupportedOperationException} if the operating system or |
67 * likely to degrade performance. The performance effects of using it |
67 * likely to degrade performance. The performance effects of using it |
68 * should be evaluated in each particular circumstance. |
68 * should be evaluated in each particular circumstance. |
69 * |
69 * |
70 * @since 10 |
70 * @since 10 |
71 */ |
71 */ |
72 DIRECT(ExtendedOptions.DIRECT); |
72 DIRECT(FileSystemOption.DIRECT); |
73 |
73 |
74 ExtendedOpenOption(ExtendedOptions.InternalOption<Void> option) { |
74 ExtendedOpenOption(FileSystemOption<Void> option) { |
75 option.register(this); |
75 option.register(this); |
76 } |
76 } |
77 } |
77 } |