IO and NiO

1、 The concept of file and the operation of file basic functions

1. What is a file: a file can be considered as a collection of relevant records or data put together 2 The file class is "an abstract representation of file and directory pathnames". Not the contents of the document. 3. The file class defines some platform independent method operations, such as creating, deleting and renaming files. 4. In Java, the directory is regarded as a special file. The list () method can return all subdirectories and files in the directory. 5. The path separator is (/) in UNIX and (\) in windos. The separator in different systems can be handled correctly in Java.

Example code:

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>