Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java40
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java45
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java54
6 files changed, 9 insertions, 152 deletions
diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
index e2bed1873a..34bbb415ba 100644
--- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
+++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
@@ -286,7 +286,6 @@ funnyRefname=funny refname
gcFailed=Garbage collection failed.
gitmodulesNotFound=.gitmodules not found in tree.
headRequiredToStash=HEAD required to stash local changes
-hiddenFilesStartWithDot=Hiding only allowed for names that start with a period
hoursAgo={0} hours ago
hugeIndexesAreNotSupportedByJgitYet=Huge indexes are not supported by jgit, yet
hunkBelongsToAnotherFile=Hunk belongs to another file
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
index d6cf6e6a7f..9067e82954 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
@@ -345,7 +345,6 @@ public class JGitText extends TranslationBundle {
/***/ public String gcFailed;
/***/ public String gitmodulesNotFound;
/***/ public String headRequiredToStash;
- /***/ public String hiddenFilesStartWithDot;
/***/ public String hoursAgo;
/***/ public String hugeIndexesAreNotSupportedByJgitYet;
/***/ public String hunkBelongsToAnotherFile;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
index 4d34394ba0..e5219b2a92 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
@@ -247,7 +247,7 @@ public abstract class FS {
* @since 3.0
*/
public long lastModified(File f) throws IOException {
- return f.lastModified();
+ return FileUtils.lastModified(f);
}
/**
@@ -260,7 +260,7 @@ public abstract class FS {
* @since 3.0
*/
public void setLastModified(File f, long time) throws IOException {
- f.setLastModified(time);
+ FileUtils.setLastModified(f, time);
}
/**
@@ -273,7 +273,7 @@ public abstract class FS {
* @since 3.0
*/
public long length(File path) throws IOException {
- return path.length();
+ return FileUtils.getLength(path);
}
/**
@@ -630,7 +630,7 @@ public abstract class FS {
* @since 3.0
*/
public boolean isSymLink(File path) throws IOException {
- return false;
+ return FileUtils.isSymlink(path);
}
/**
@@ -642,7 +642,7 @@ public abstract class FS {
* @since 3.0
*/
public boolean exists(File path) {
- return path.exists();
+ return FileUtils.exists(path);
}
/**
@@ -654,7 +654,7 @@ public abstract class FS {
* @since 3.0
*/
public boolean isDirectory(File path) {
- return path.isDirectory();
+ return FileUtils.isDirectory(path);
}
/**
@@ -666,7 +666,7 @@ public abstract class FS {
* @since 3.0
*/
public boolean isFile(File path) {
- return path.isFile();
+ return FileUtils.isFile(path);
}
/**
@@ -677,7 +677,7 @@ public abstract class FS {
* @since 3.0
*/
public boolean isHidden(File path) throws IOException {
- return path.isHidden();
+ return FileUtils.isHidden(path);
}
/**
@@ -689,9 +689,7 @@ public abstract class FS {
* @since 3.0
*/
public void setHidden(File path, boolean hidden) throws IOException {
- if (!path.getName().startsWith(".")) //$NON-NLS-1$
- throw new IllegalArgumentException(
- JGitText.get().hiddenFilesStartWithDot);
+ FileUtils.setHidden(path, hidden);
}
/**
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java
index c2005b13ee..779b10e1bb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java
@@ -246,46 +246,6 @@ public class FS_POSIX extends FS {
}
@Override
- public boolean isSymLink(File path) throws IOException {
- return FileUtils.isSymlink(path);
- }
-
- @Override
- public long lastModified(File path) throws IOException {
- return FileUtils.lastModified(path);
- }
-
- @Override
- public void setLastModified(File path, long time) throws IOException {
- FileUtils.setLastModified(path, time);
- }
-
- @Override
- public long length(File f) throws IOException {
- return FileUtils.getLength(f);
- }
-
- @Override
- public boolean exists(File path) {
- return FileUtils.exists(path);
- }
-
- @Override
- public boolean isDirectory(File path) {
- return FileUtils.isDirectory(path);
- }
-
- @Override
- public boolean isFile(File path) {
- return FileUtils.isFile(path);
- }
-
- @Override
- public boolean isHidden(File path) throws IOException {
- return FileUtils.isHidden(path);
- }
-
- @Override
public void setHidden(File path, boolean hidden) throws IOException {
// no action on POSIX
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java
index 21aafc37de..f0a2e721a6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java
@@ -183,51 +183,6 @@ public class FS_Win32 extends FS {
}
}
- @Override
- public boolean isSymLink(File path) throws IOException {
- return FileUtils.isSymlink(path);
- }
-
- @Override
- public long lastModified(File path) throws IOException {
- return FileUtils.lastModified(path);
- }
-
- @Override
- public void setLastModified(File path, long time) throws IOException {
- FileUtils.setLastModified(path, time);
- }
-
- @Override
- public long length(File f) throws IOException {
- return FileUtils.getLength(f);
- }
-
- @Override
- public boolean exists(File path) {
- return FileUtils.exists(path);
- }
-
- @Override
- public boolean isDirectory(File path) {
- return FileUtils.isDirectory(path);
- }
-
- @Override
- public boolean isFile(File path) {
- return FileUtils.isFile(path);
- }
-
- @Override
- public boolean isHidden(File path) throws IOException {
- return FileUtils.isHidden(path);
- }
-
- @Override
- public void setHidden(File path, boolean hidden) throws IOException {
- FileUtils.setHidden(path, hidden);
- }
-
/**
* @since 3.3
*/
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
index 2952b65202..2450be4c17 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
@@ -44,7 +44,6 @@
package org.eclipse.jgit.util;
import java.io.File;
-import java.io.IOException;
import java.io.PrintStream;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -168,59 +167,6 @@ public class FS_Win32_Cygwin extends FS_Win32 {
return true;
}
- @Override
- public boolean isSymLink(File path) throws IOException {
- return FileUtils.isSymlink(path);
- }
-
- @Override
- public long lastModified(File path) throws IOException {
- return FileUtils.lastModified(path);
- }
-
- @Override
- public void setLastModified(File path, long time) throws IOException {
- FileUtils.setLastModified(path, time);
- }
-
- @Override
- public long length(File f) throws IOException {
- return FileUtils.getLength(f);
- }
-
- @Override
- public boolean exists(File path) {
- return FileUtils.exists(path);
- }
-
- @Override
- public boolean isDirectory(File path) {
- return FileUtils.isDirectory(path);
- }
-
- @Override
- public boolean isFile(File path) {
- return FileUtils.isFile(path);
- }
-
- @Override
- public boolean isHidden(File path) throws IOException {
- return FileUtils.isHidden(path);
- }
-
- @Override
- public void setHidden(File path, boolean hidden) throws IOException {
- FileUtils.setHidden(path, hidden);
- }
-
- /**
- * @since 3.3
- */
- @Override
- public Attributes getAttributes(File path) {
- return FileUtils.getFileAttributesBasic(this, path);
- }
-
/**
* @since 3.7
*/

Back to the top