Simplify sink configuration

This commit is contained in:
Benjamin Muskalla
2021-09-30 16:26:04 +02:00
parent 1a4fd7bc7d
commit 7a7ec06819
2 changed files with 7 additions and 13 deletions

View File

@@ -10,8 +10,8 @@ import java.nio.file.Path;
public class Sinks {
public Path copyFileToDirectory(final Path sourceFile, final Path targetDirectory, final CopyOption... copyOptions) throws IOException {
return Files.copy(sourceFile, targetDirectory.resolve(sourceFile.getFileName()), copyOptions);
public Path copyFileToDirectory(final Path sourceFile, final Path targetFile, final CopyOption... copyOptions) throws IOException {
return Files.copy(sourceFile, targetFile, copyOptions);
}
public String readUrl(final URL url, Charset encoding) throws IOException {