Package software.amazon.awssdk.crt.io
Class DirectoryTraversal
- java.lang.Object
-
- software.amazon.awssdk.crt.io.DirectoryTraversal
-
@Deprecated public final class DirectoryTraversal extends Object
Deprecated.It is currently an EXPERIMENTAL feature meant for internal use only. It may be changed incompatibly or removed in a future version.This class wraps the directory traversal implementation provided by the CRT.
-
-
Constructor Summary
Constructors Constructor Description DirectoryTraversal()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
traverse(String path, boolean recursive, DirectoryTraversalHandler handler)
Deprecated.Traverse a directory starting at the path provided.
-
-
-
Method Detail
-
traverse
public static void traverse(String path, boolean recursive, DirectoryTraversalHandler handler)
Deprecated.Traverse a directory starting at the path provided. If you want the traversal to recurse the entire directory, pass recursive as true. Passing false for this parameter will only iterate the contents of the directory, but will not descend into any directories it encounters. If recursive is set to true, the traversal is performed post-order, depth-first (for practical reasons such as deleting a directory that contains subdirectories or files). The traversal iteration can be cancelled by the user by returning false from the callback. If the traversal is cancelled either returning false from the callback or an unhandled exception is thrown from the callback, the traverse method will throw a RuntimeException to notify user about incomplete results.- Parameters:
path
- directory to traverse.recursive
- true to recurse the entire directory, false will only iterate the path specifiedhandler
- callback to invoke for each file or directory found during the traversal.
-
-