* @since 3.3
*/
public void delete(File f) throws IOException {
- if (!f.delete())
- throw new IOException(MessageFormat.format(
- JGitText.get().deleteFileFailed, f.getAbsolutePath()));
+ FileUtils.delete(f);
}
/**
FileUtil.setLastModified(path, time);
}
- @Override
- public void delete(File path) throws IOException {
- FileUtil.delete(path);
- }
-
@Override
public long length(File f) throws IOException {
return FileUtil.getLength(f);
FileUtil.setLastModified(path, time);
}
- @Override
- public void delete(File path) throws IOException {
- FileUtil.delete(path);
- }
-
@Override
public long length(File f) throws IOException {
return FileUtil.getLength(f);
FileUtil.setLastModified(path, time);
}
- @Override
- public void delete(File path) throws IOException {
- FileUtil.delete(path);
- }
-
@Override
public long length(File f) throws IOException {
return FileUtil.getLength(f);
/**
* @param path
* @throws IOException
+ * @deprecated use {@link FileUtils#delete(File)}
*/
+ @Deprecated
public static void delete(File path) throws IOException {
- Path nioPath = path.toPath();
- Files.delete(nioPath);
+ FileUtils.delete(path);
}
static Attributes getFileAttributesBasic(FS fs, File path) {