public class DeleteFileVisitor extends SimpleFileVisitor<Path>
The tree can change while it is being walked, so an entry that is already gone by the time it is visited is not an
error: the goal state for it has been reached. An entry that is still there and cannot be removed is an error and is
reported to the caller. A directory that could not be emptied, either because entries appeared in it after it was
walked or because listing it failed, is reported through incompleteDir(), and the caller decides whether to
walk the tree again.
| Constructor and Description |
|---|
DeleteFileVisitor(org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotOperationContext ctx,
IgniteLogger log,
Path root,
Set<String> skipInRoot) |
| Modifier and Type | Method and Description |
|---|---|
@Nullable Path |
incompleteDir() |
FileVisitResult |
postVisitDirectory(Path dir,
IOException exc) |
FileVisitResult |
visitFile(Path file,
BasicFileAttributes attrs) |
FileVisitResult |
visitFileFailed(Path file,
IOException exc) |
preVisitDirectorypublic DeleteFileVisitor(org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotOperationContext ctx,
IgniteLogger log,
Path root,
Set<String> skipInRoot)
ctx - Progress context.log - Logger.root - Root of the walked tree.skipInRoot - Names to keep in the root of the tree.public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException
visitFile in interface FileVisitor<Path>visitFile in class SimpleFileVisitor<Path>IOExceptionpublic FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException
visitFileFailed in interface FileVisitor<Path>visitFileFailed in class SimpleFileVisitor<Path>IOExceptionpublic FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException
postVisitDirectory in interface FileVisitor<Path>postVisitDirectory in class SimpleFileVisitor<Path>IOException@Nullable public @Nullable Path incompleteDir()
null if the whole tree was emptied.
GridGain In-Memory Computing Platform : ver. 8.9.37 Release Date : August 25 2026