JavaFile

具体应用下次介绍谢谢!

File文件和路径名抽象表示形式,File类的实例是不可变的

构造方法:

File(File parent, String child)---File(String pathname)---File(String parent, String child)

File的常用功能

创建功能

createNewFile()

makrdir()

makdirs()

删除功能

delete()

获取功能

getAbsolutePath()

getAbsoluteFile()

getParent()

getParentFile()

getPath()

lastModified()

length()

判断功能

exists()

isAbsolute()

isDirectory()

isFile()

isHidden()

修改文件名:

renameTo(File dest)

猜你喜欢

转载自www.cnblogs.com/zw321/p/11332497.html