JavaFile

Thank you, next time introduce specific application!

File file path name and shows an example of an abstract form, the File class are immutable

Construction method:

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

File common functions

Creating function

createNewFile()

makrdir ()

makdirs ()

Delete function

delete()

Acquisition function

getAbsolutePath()

getAbsoluteFile()

getParent()

getParentFile()

getPath()

lastModified ()

length()

Judgment function

exists()

isAbsolute()

isDirectory()

isFile()

isHidden()

Modify the file name:

renameTo(File dest)

Guess you like

Origin www.cnblogs.com/zw321/p/11332497.html