44 * <p> A {@code SecureDirectoryStream} requires corresponding support from the |
44 * <p> A {@code SecureDirectoryStream} requires corresponding support from the |
45 * underlying operating system. Where an implementation supports this features |
45 * underlying operating system. Where an implementation supports this features |
46 * then the {@code DirectoryStream} returned by the {@link Path#newDirectoryStream |
46 * then the {@code DirectoryStream} returned by the {@link Path#newDirectoryStream |
47 * newDirectoryStream} method will be a {@code SecureDirectoryStream} and must |
47 * newDirectoryStream} method will be a {@code SecureDirectoryStream} and must |
48 * be cast to that type in order to invoke the methods defined by this interface. |
48 * be cast to that type in order to invoke the methods defined by this interface. |
49 * |
|
50 * <p> As specified by {@code DirectoryStream}, the iterator's {@link |
|
51 * java.util.Iterator#remove() remove} method removes the directory entry for |
|
52 * the last element returned by the iterator. In the case of a {@code |
|
53 * SecureDirectoryStream} the {@code remove} method behaves as if by invoking |
|
54 * the {@link #deleteFile deleteFile} or {@link #deleteDirectory deleteDirectory} |
|
55 * methods defined by this interface. The {@code remove} may require to examine |
|
56 * the file to determine if the file is a directory, and consequently, it may |
|
57 * not be atomic with respect to other file system operations. |
|
58 * |
49 * |
59 * <p> In the case of the default {@link java.nio.file.spi.FileSystemProvider |
50 * <p> In the case of the default {@link java.nio.file.spi.FileSystemProvider |
60 * provider}, and a security manager is set, then the permission checks are |
51 * provider}, and a security manager is set, then the permission checks are |
61 * performed using the path obtained by resolving the given relative path |
52 * performed using the path obtained by resolving the given relative path |
62 * against the <i>original path</i> of the directory (irrespective of if the |
53 * against the <i>original path</i> of the directory (irrespective of if the |