import java.io.InputStreamReader;
import java.security.AccessController;
import java.security.PrivilegedAction;
+import java.text.MessageFormat;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicBoolean;
return path.length();
}
+ /**
+ * Delete a file. Throws an exception if delete fails.
+ *
+ * @param f
+ * @throws IOException
+ * this may be a Java7 subclass with detailed information
+ * @since 3.3
+ */
+ public void delete(File f) throws IOException {
+ if (!f.delete())
+ throw new IOException(MessageFormat.format(
+ JGitText.get().deleteFileFailed, f.getAbsolutePath()));
+ }
+
/**
* Resolve this file to its actual path name that the JRE can use.
* <p>