Java tutorial
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { /** * Set a track as complete. * @param file File * @return True if the operation was successful */ public static boolean setComplete(File file) { return file.renameTo(new File(file.getAbsolutePath() + ".complete")); } }