Package net.shibboleth.idp.installer

# Class InstallerSupport.NameClashVisitor

java.lang.Object
java.nio.file.SimpleFileVisitor<Path>
net.shibboleth.idp.installer.InstallerSupport.NameClashVisitor

All Implemented Interfaces:
  `FileVisitor<Path>`

Enclosing class:
  InstallerSupport

private static final class InstallerSupport.NameClashVisitor extends SimpleFileVisitor<Path>
A @{link `FileVisitor` which detects (and logs) whether a copy would overwrite.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final Path`
`from`
Path we are traversing.
`private boolean`
`nameClash`
did we find a duplicate.
`private final Path`
`to`
Path where we check for Duplicates.

## Constructor Summary

Constructors
Constructor
Description
`NameClashVisitor(Path fromDir, Path toDir)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`FileVisitResult`
`visitFile(Path file, BasicFileAttributes attrs)`
`boolean`
`wasNameClash()`
did we find a name clash?

### Methods inherited from class java.nio.file.SimpleFileVisitor

`postVisitDirectory, preVisitDirectory, visitFileFailed`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### nameClash

private boolean nameClash
did we find a duplicate.

### from

private final Path from
Path we are traversing.

### to

private final Path to
Path where we check for Duplicates.

## Constructor Details

### NameClashVisitor

public NameClashVisitor(@Nonnull Path fromDir, @Nonnull Path toDir)
Constructor.

Parameters:
  `fromDir` - Path we are traversing
  `toDir` - Path where we check for Duplicates

## Method Details

### visitFile

public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException

Specified by:
  `visitFile` in interface `FileVisitor<Path>`
Overrides:
  `visitFile` in class `SimpleFileVisitor<Path>`
Throws:
  `IOException`

### wasNameClash

public boolean wasNameClash()
did we find a name clash?

Returns:
  whether we found a name clash.