public static void moveFile()

in src/main/java/org/apache/servicemix/util/FileUtil.java [54:62]


    public static void moveFile(File src, File targetDirectory)
            throws IOException {
        if (src == null || !src.exists() || !src.isFile() ||
            targetDirectory == null || !targetDirectory.exists() || !targetDirectory.isDirectory() ||
            !src.renameTo(new File(targetDirectory, src.getName()))) {
            // unable to move the file
            throw new IOException("Failed to move " + src + " to " + targetDirectory);
        }
    }