hudson.Util._chmodAnt()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(143)

本文整理了Java中hudson.Util._chmodAnt()方法的一些代码示例,展示了Util._chmodAnt()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util._chmodAnt()方法的具体详情如下:
包路径:hudson.Util
类名称:Util
方法名:_chmodAnt

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);
  }
}

相关文章

微信公众号

最新文章

更多