本文整理了Java中org.eclipse.jgit.util.FS.setExecute()
方法的一些代码示例,展示了FS.setExecute()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FS.setExecute()
方法的具体详情如下:
包路径:org.eclipse.jgit.util.FS
类名称:FS
方法名:setExecute
[英]Set a file to be executable by the user.
Not all platforms and JREs support executable flags on files. If the feature is unsupported this method will always return false and no changes will be made to the file specified.
[中]将文件设置为可由用户执行。
并非所有平台和JRE都支持文件上的可执行标志。如果功能不受支持,此方法将始终返回false,并且不会对指定的文件进行任何更改。
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
getRepository().getFS().setExecute(f, fh.getNewMode() == FileMode.EXECUTABLE_FILE);
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
if (FileMode.EXECUTABLE_FILE.equals(entry.getRawMode())) {
if (!fs.canExecute(tmpFile))
fs.setExecute(tmpFile, true);
} else {
if (fs.canExecute(tmpFile))
fs.setExecute(tmpFile, false);
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
File tmp = File.createTempFile("try", "execute", getDirectory()); //$NON-NLS-1$ //$NON-NLS-2$
getFS().setExecute(tmp, true);
final boolean on = getFS().canExecute(tmp);
getFS().setExecute(tmp, false);
final boolean off = getFS().canExecute(tmp);
FileUtils.delete(tmp);
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
fw.close();
getRepository().getFS().setExecute(f, fh.getNewMode() == FileMode.EXECUTABLE_FILE);
代码示例来源:origin: berlam/github-bucket
getRepository().getFS().setExecute(f, fh.getNewMode() == FileMode.EXECUTABLE_FILE);
代码示例来源:origin: berlam/github-bucket
if (FileMode.EXECUTABLE_FILE.equals(entry.getRawMode())) {
if (!fs.canExecute(tmpFile))
fs.setExecute(tmpFile, true);
} else {
if (fs.canExecute(tmpFile))
fs.setExecute(tmpFile, false);
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
if (FileMode.EXECUTABLE_FILE.equals(entry.getRawMode())) {
if (!fs.canExecute(tmpFile))
fs.setExecute(tmpFile, true);
} else {
if (fs.canExecute(tmpFile))
fs.setExecute(tmpFile, false);
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
File tmp = File.createTempFile("try", "execute", getDirectory()); //$NON-NLS-1$ //$NON-NLS-2$
getFS().setExecute(tmp, true);
final boolean on = getFS().canExecute(tmp);
getFS().setExecute(tmp, false);
final boolean off = getFS().canExecute(tmp);
FileUtils.delete(tmp);
代码示例来源:origin: berlam/github-bucket
File tmp = File.createTempFile("try", "execute", getDirectory()); //$NON-NLS-1$ //$NON-NLS-2$
getFS().setExecute(tmp, true);
final boolean on = getFS().canExecute(tmp);
getFS().setExecute(tmp, false);
final boolean off = getFS().canExecute(tmp);
FileUtils.delete(tmp);
内容来源于网络,如有侵权,请联系作者删除!