1 /* 2 * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 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 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package java.nio.file; 27 28 @SuppressWarnings({"unchecked", "deprecation", "all"}) 29 class FileTreeWalker implements java.io.Closeable { 30 FileTreeWalker(java.util.Collection<java.nio.file.FileVisitOption> options, int maxDepth)31 FileTreeWalker(java.util.Collection<java.nio.file.FileVisitOption> options, int maxDepth) { 32 throw new RuntimeException("Stub!"); 33 } 34 getAttributes( java.nio.file.Path file, boolean canUseCached)35 private java.nio.file.attribute.BasicFileAttributes getAttributes( 36 java.nio.file.Path file, boolean canUseCached) throws java.io.IOException { 37 throw new RuntimeException("Stub!"); 38 } 39 wouldLoop(java.nio.file.Path dir, java.lang.Object key)40 private boolean wouldLoop(java.nio.file.Path dir, java.lang.Object key) { 41 throw new RuntimeException("Stub!"); 42 } 43 visit( java.nio.file.Path entry, boolean ignoreSecurityException, boolean canUseCached)44 private java.nio.file.FileTreeWalker.Event visit( 45 java.nio.file.Path entry, boolean ignoreSecurityException, boolean canUseCached) { 46 throw new RuntimeException("Stub!"); 47 } 48 walk(java.nio.file.Path file)49 java.nio.file.FileTreeWalker.Event walk(java.nio.file.Path file) { 50 throw new RuntimeException("Stub!"); 51 } 52 next()53 java.nio.file.FileTreeWalker.Event next() { 54 throw new RuntimeException("Stub!"); 55 } 56 pop()57 void pop() { 58 throw new RuntimeException("Stub!"); 59 } 60 skipRemainingSiblings()61 void skipRemainingSiblings() { 62 throw new RuntimeException("Stub!"); 63 } 64 isOpen()65 boolean isOpen() { 66 throw new RuntimeException("Stub!"); 67 } 68 close()69 public void close() { 70 throw new RuntimeException("Stub!"); 71 } 72 73 private boolean closed; 74 75 @android.compat.annotation.UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) private final boolean followLinks; 76 77 { 78 followLinks = false; 79 } 80 81 @android.compat.annotation.UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) 82 private final java.nio.file.LinkOption[] linkOptions; 83 84 { 85 linkOptions = new java.nio.file.LinkOption[0]; 86 } 87 88 @android.compat.annotation.UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) private final int maxDepth; 89 90 { 91 maxDepth = 0; 92 } 93 94 private final java.util.ArrayDeque<java.nio.file.FileTreeWalker.DirectoryNode> stack; 95 96 { 97 stack = null; 98 } 99 100 @SuppressWarnings({"unchecked", "deprecation", "all"}) 101 private static class DirectoryNode { 102 DirectoryNode( java.nio.file.Path dir, java.lang.Object key, java.nio.file.DirectoryStream<java.nio.file.Path> stream)103 DirectoryNode( 104 java.nio.file.Path dir, 105 java.lang.Object key, 106 java.nio.file.DirectoryStream<java.nio.file.Path> stream) { 107 throw new RuntimeException("Stub!"); 108 } 109 directory()110 java.nio.file.Path directory() { 111 throw new RuntimeException("Stub!"); 112 } 113 key()114 java.lang.Object key() { 115 throw new RuntimeException("Stub!"); 116 } 117 stream()118 java.nio.file.DirectoryStream<java.nio.file.Path> stream() { 119 throw new RuntimeException("Stub!"); 120 } 121 iterator()122 java.util.Iterator<java.nio.file.Path> iterator() { 123 throw new RuntimeException("Stub!"); 124 } 125 skip()126 void skip() { 127 throw new RuntimeException("Stub!"); 128 } 129 skipped()130 boolean skipped() { 131 throw new RuntimeException("Stub!"); 132 } 133 134 private final java.nio.file.Path dir; 135 136 { 137 dir = null; 138 } 139 140 private final java.util.Iterator<java.nio.file.Path> iterator; 141 142 { 143 iterator = null; 144 } 145 146 private final java.lang.Object key; 147 148 { 149 key = null; 150 } 151 152 private boolean skipped; 153 154 private final java.nio.file.DirectoryStream<java.nio.file.Path> stream; 155 156 { 157 stream = null; 158 } 159 } 160 161 @SuppressWarnings({"unchecked", "deprecation", "all"}) 162 static class Event { 163 Event( java.nio.file.FileTreeWalker.EventType type, java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attrs, java.io.IOException ioe)164 private Event( 165 java.nio.file.FileTreeWalker.EventType type, 166 java.nio.file.Path file, 167 java.nio.file.attribute.BasicFileAttributes attrs, 168 java.io.IOException ioe) { 169 throw new RuntimeException("Stub!"); 170 } 171 Event( java.nio.file.FileTreeWalker.EventType type, java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attrs)172 Event( 173 java.nio.file.FileTreeWalker.EventType type, 174 java.nio.file.Path file, 175 java.nio.file.attribute.BasicFileAttributes attrs) { 176 throw new RuntimeException("Stub!"); 177 } 178 Event( java.nio.file.FileTreeWalker.EventType type, java.nio.file.Path file, java.io.IOException ioe)179 Event( 180 java.nio.file.FileTreeWalker.EventType type, 181 java.nio.file.Path file, 182 java.io.IOException ioe) { 183 throw new RuntimeException("Stub!"); 184 } 185 type()186 java.nio.file.FileTreeWalker.EventType type() { 187 throw new RuntimeException("Stub!"); 188 } 189 file()190 java.nio.file.Path file() { 191 throw new RuntimeException("Stub!"); 192 } 193 attributes()194 java.nio.file.attribute.BasicFileAttributes attributes() { 195 throw new RuntimeException("Stub!"); 196 } 197 ioeException()198 java.io.IOException ioeException() { 199 throw new RuntimeException("Stub!"); 200 } 201 202 private final java.nio.file.attribute.BasicFileAttributes attrs; 203 204 { 205 attrs = null; 206 } 207 208 private final java.nio.file.Path file; 209 210 { 211 file = null; 212 } 213 214 private final java.io.IOException ioe; 215 216 { 217 ioe = null; 218 } 219 220 private final java.nio.file.FileTreeWalker.EventType type; 221 222 { 223 type = null; 224 } 225 } 226 227 @SuppressWarnings({"unchecked", "deprecation", "all"}) 228 static enum EventType { 229 START_DIRECTORY, 230 END_DIRECTORY, 231 ENTRY; 232 EventType()233 private EventType() { 234 throw new RuntimeException("Stub!"); 235 } 236 } 237 } 238