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
/***/ public String gcFailed;
/***/ public String gitmodulesNotFound;
/***/ public String headRequiredToStash;
- /***/ public String hiddenFilesStartWithDot;
/***/ public String hoursAgo;
/***/ public String hugeIndexesAreNotSupportedByJgitYet;
/***/ public String hunkBelongsToAnotherFile;
* @since 3.0
*/
public long lastModified(File f) throws IOException {
- return f.lastModified();
+ return FileUtils.lastModified(f);
}
/**
* @since 3.0
*/
public void setLastModified(File f, long time) throws IOException {
- f.setLastModified(time);
+ FileUtils.setLastModified(f, time);
}
/**
* @since 3.0
*/
public long length(File path) throws IOException {
- return path.length();
+ return FileUtils.getLength(path);
}
/**
* @since 3.0
*/
public boolean isSymLink(File path) throws IOException {
- return false;
+ return FileUtils.isSymlink(path);
}
/**
* @since 3.0
*/
public boolean exists(File path) {
- return path.exists();
+ return FileUtils.exists(path);
}
/**
* @since 3.0
*/
public boolean isDirectory(File path) {
- return path.isDirectory();
+ return FileUtils.isDirectory(path);
}
/**
* @since 3.0
*/
public boolean isFile(File path) {
- return path.isFile();
+ return FileUtils.isFile(path);
}
/**
* @since 3.0
*/
public boolean isHidden(File path) throws IOException {
- return path.isHidden();
+ return FileUtils.isHidden(path);
}
/**
* @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);
}
/**
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 {
// no action on POSIX
}
}
- @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
*/
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;
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
*/