lraa

转载网址:http://blog.sina.com.cn/s/blog_5edcfe6a0100iogn.html

/**
  * 去除文只读隐藏属性
  * @param absolutePath  String
  */


public static void clearReadonly(String absolutePath) {
  try {


   Runtime.getRuntime().exec("cmd /c attrib " + absolutePath + " -r -a -s -h");

  System.out.println("文件: " + absolutePath + " 已去除只读属性!");


  } catch (IOException e) {
   e.printStackTrace();
  }

}

分类:

技术点:

相关文章:

  • 2021-08-21
  • 2021-12-07
  • 2021-11-27
  • 2021-09-27
  • 2021-12-05
  • 2021-11-27
  • 2021-09-28
  • 2021-11-27
猜你喜欢
  • 2021-11-27
  • 2021-11-27
  • 2021-09-08
  • 2021-11-27
  • 2021-11-27
  • 2021-11-27
  • 2021-05-20
相关资源
相似解决方案