@@ -554,15 +554,14 @@ public static URL[] toURLs(File[] files) throws IOException {
554554 *
555555 * @param srcFile an existing file to copy, must not be <code>null</code>
556556 * @param destDir the directory to place the copy in, must not be <code>null</code>
557- * @return the new file
558557 *
559558 * @throws NullPointerException if source or destination is null
560559 * @throws IOException if source or destination is invalid
561560 * @throws IOException if an IO error occurs during copying
562561 * @see #copyFile(File, File, boolean)
563562 */
564- public static File copyFileToDirectory (File srcFile , File destDir ) throws IOException {
565- return copyFileToDirectory (srcFile , destDir , true );
563+ public static void copyFileToDirectory (File srcFile , File destDir ) throws IOException {
564+ copyFileToDirectory (srcFile , destDir , true );
566565 }
567566
568567 /**
@@ -577,15 +576,14 @@ public static File copyFileToDirectory(File srcFile, File destDir) throws IOExce
577576 * @param destDir the directory to place the copy in, must not be <code>null</code>
578577 * @param preserveFileDate true if the file date of the copy
579578 * should be the same as the original
580- * @return the new file
581579 *
582580 * @throws NullPointerException if source or destination is <code>null</code>
583581 * @throws IOException if source or destination is invalid
584582 * @throws IOException if an IO error occurs during copying
585583 * @see #copyFile(File, File, boolean)
586584 * @since Commons IO 1.3
587585 */
588- public static File copyFileToDirectory (File srcFile , File destDir , boolean preserveFileDate ) throws IOException {
586+ public static void copyFileToDirectory (File srcFile , File destDir , boolean preserveFileDate ) throws IOException {
589587 if (destDir == null ) {
590588 throw new NullPointerException ("Destination must not be null" );
591589 }
@@ -594,7 +592,6 @@ public static File copyFileToDirectory(File srcFile, File destDir, boolean prese
594592 }
595593 File destFile = new File (destDir , srcFile .getName ());
596594 copyFile (srcFile , destFile , preserveFileDate );
597- return destFile ;
598595 }
599596
600597 /**
0 commit comments