The documentation Files.move(Path source, Path target, CopyOption... options)says:
As an alternative, suppose we want to move the file to a new directory, keeping the same file name and replacing any existing file with this name in the directory:
Path source = ...
Path newdir = ...
Files.move(source, newdir.resolve(source.getFileName()), REPLACE_EXISTING);
Why am I getting an error in the following code?
Files.move(Paths.get("outputFilePath"), Paths.get("inputFilePath"), REPLACE_EXISTING);
REPLACE_EXISTING cannot be resolved by variable
source
share