本文整理了Java中hudson.Util._chmodAnt()
方法的一些代码示例,展示了Util._chmodAnt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util._chmodAnt()
方法的具体详情如下:
包路径:hudson.Util
类名称:Util
方法名:_chmodAnt
暂无
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Run chmod natively if we can, otherwise fall back to Ant.
*/
public static void chmod(File f, int mask, boolean tryNative, NativeUtils nativeUtils) {
if (Functions.isWindows()) {
return; // noop
}
if (nativeUtils == null){
tryNative = false;
}
if (tryNative) {
try {
nativeUtils.chmod(f, mask);
} catch (NativeAccessException exc) {
LOGGER.log(Level.WARNING, "Native function chmod failed. Using Ant''s chmod task instead.");
_chmodAnt(f, mask);
}
} else {
_chmodAnt(f, mask);
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Run chmod natively if we can, otherwise fall back to Ant.
*/
public static void chmod(File f, int mask, boolean tryNative) {
if (Functions.isWindows()) {
return; // noop
}
if (tryNative) {
try {
NativeUtils.getInstance().chmod(f, mask);
} catch (NativeAccessException exc) {
LOGGER.log(Level.WARNING, "Native function chmod failed ({0}). Using Ant''s chmod task instead.", NativeUtils.getInstance().getLastUnixError());
_chmodAnt(f, mask);
}
} else {
_chmodAnt(f, mask);
}
}
内容来源于网络,如有侵权,请联系作者删除!