您的位置:首页 >java如何设置文件属性
发布于2023-04-25 阅读(0)
扫一扫,手机访问
文件属性设置
package com.file;
import java.io.File;
/**
* Created by elijahliu on 2017/2/11.
*/
public class SetFileProperty {
public static void main(String[] args){
File file = new File("test.file");
if (file.exists()){
file.setWritable(true);//可写
file.setReadable(true);//可读
file.setReadOnly();//只读
}
}
}
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
正版软件
正版软件
正版软件
正版软件
正版软件
1
2
3
7
9