|
|
@ -50,6 +50,7 @@ import java.io.InputStream; |
|
|
|
import java.io.InputStreamReader; |
|
|
|
import java.io.InputStreamReader; |
|
|
|
import java.security.AccessController; |
|
|
|
import java.security.AccessController; |
|
|
|
import java.security.PrivilegedAction; |
|
|
|
import java.security.PrivilegedAction; |
|
|
|
|
|
|
|
import java.text.MessageFormat; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.concurrent.atomic.AtomicBoolean; |
|
|
|
import java.util.concurrent.atomic.AtomicBoolean; |
|
|
|
|
|
|
|
|
|
|
@ -272,6 +273,20 @@ public abstract class FS { |
|
|
|
return path.length(); |
|
|
|
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. |
|
|
|
* Resolve this file to its actual path name that the JRE can use. |
|
|
|
* <p> |
|
|
|
* <p> |
|
|
|