diff options
Diffstat (limited to 'org.eclipse.jgit.java7')
4 files changed, 20 insertions, 0 deletions
diff --git a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_POSIX_Java7.java b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_POSIX_Java7.java index b19a432e28..6a98481797 100644 --- a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_POSIX_Java7.java +++ b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_POSIX_Java7.java @@ -107,6 +107,11 @@ public class FS_POSIX_Java7 extends FS_POSIX { } @Override + public void delete(File path) throws IOException { + FileUtil.delete(path); + } + + @Override public long length(File f) throws IOException { return FileUtil.getLength(f); } diff --git a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7.java b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7.java index 98df7c85c1..5551632228 100644 --- a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7.java +++ b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7.java @@ -108,6 +108,11 @@ public class FS_Win32_Java7 extends FS_Win32 { } @Override + public void delete(File path) throws IOException { + FileUtil.delete(path); + } + + @Override public long length(File f) throws IOException { return FileUtil.getLength(f); } diff --git a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7Cygwin.java b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7Cygwin.java index 1130668e5f..3db2e53e42 100644 --- a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7Cygwin.java +++ b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7Cygwin.java @@ -84,6 +84,11 @@ public class FS_Win32_Java7Cygwin extends FS_Win32_Cygwin { } @Override + public void delete(File path) throws IOException { + FileUtil.delete(path); + } + + @Override public long length(File f) throws IOException { return FileUtil.getLength(f); } diff --git a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FileUtil.java b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FileUtil.java index 3cf1c12ff1..428a45f79b 100644 --- a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FileUtil.java +++ b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FileUtil.java @@ -139,4 +139,9 @@ class FileUtil { return path.setExecutable(executable); } + public static void delete(File path) throws IOException { + Path nioPath = path.toPath(); + Files.delete(nioPath); + } + } |