@@ -560,15 +560,14 @@ public static URL[] toURLs(File[] files) throws IOException {
560560 *
561561 * @param srcFile an existing file to copy, must not be <code>null</code>
562562 * @param destDir the directory to place the copy in, must not be <code>null</code>
563- * @return the new file
564563 *
565564 * @throws NullPointerException if source or destination is null
566565 * @throws IOException if source or destination is invalid
567566 * @throws IOException if an IO error occurs during copying
568567 * @see #copyFile(File, File, boolean)
569568 */
570- public static File copyFileToDirectory (File srcFile , File destDir ) throws IOException {
571- return copyFileToDirectory (srcFile , destDir , true );
569+ public static void copyFileToDirectory (File srcFile , File destDir ) throws IOException {
570+ copyFileToDirectory (srcFile , destDir , true );
572571 }
573572
574573 /**
@@ -583,15 +582,14 @@ public static File copyFileToDirectory(File srcFile, File destDir) throws IOExce
583582 * @param destDir the directory to place the copy in, must not be <code>null</code>
584583 * @param preserveFileDate true if the file date of the copy
585584 * should be the same as the original
586- * @return the new file
587585 *
588586 * @throws NullPointerException if source or destination is <code>null</code>
589587 * @throws IOException if source or destination is invalid
590588 * @throws IOException if an IO error occurs during copying
591589 * @see #copyFile(File, File, boolean)
592590 * @since Commons IO 1.3
593591 */
594- public static File copyFileToDirectory (File srcFile , File destDir , boolean preserveFileDate ) throws IOException {
592+ public static void copyFileToDirectory (File srcFile , File destDir , boolean preserveFileDate ) throws IOException {
595593 if (destDir == null ) {
596594 throw new NullPointerException ("Destination must not be null" );
597595 }
@@ -600,7 +598,6 @@ public static File copyFileToDirectory(File srcFile, File destDir, boolean prese
600598 }
601599 File destFile = new File (destDir , srcFile .getName ());
602600 copyFile (srcFile , destFile , preserveFileDate );
603- return destFile ;
604601 }
605602
606603 /**
0 commit comments