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

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

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

Util._chmodAnt介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.hudson/hudson-core

  1. /**
  2. * Run chmod natively if we can, otherwise fall back to Ant.
  3. */
  4. public static void chmod(File f, int mask, boolean tryNative, NativeUtils nativeUtils) {
  5. if (Functions.isWindows()) {
  6. return; // noop
  7. }
  8. if (nativeUtils == null){
  9. tryNative = false;
  10. }
  11. if (tryNative) {
  12. try {
  13. nativeUtils.chmod(f, mask);
  14. } catch (NativeAccessException exc) {
  15. LOGGER.log(Level.WARNING, "Native function chmod failed. Using Ant''s chmod task instead.");
  16. _chmodAnt(f, mask);
  17. }
  18. } else {
  19. _chmodAnt(f, mask);
  20. }
  21. }

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

  1. /**
  2. * Run chmod natively if we can, otherwise fall back to Ant.
  3. */
  4. public static void chmod(File f, int mask, boolean tryNative) {
  5. if (Functions.isWindows()) {
  6. return; // noop
  7. }
  8. if (tryNative) {
  9. try {
  10. NativeUtils.getInstance().chmod(f, mask);
  11. } catch (NativeAccessException exc) {
  12. LOGGER.log(Level.WARNING, "Native function chmod failed ({0}). Using Ant''s chmod task instead.", NativeUtils.getInstance().getLastUnixError());
  13. _chmodAnt(f, mask);
  14. }
  15. } else {
  16. _chmodAnt(f, mask);
  17. }
  18. }

相关文章