「 JAVA 」
August 19, 2018
Words count
2.7k
Reading time
2 mins.
String getName() //得到一个文件的名称(不包括路径)
String getPath() //得到一个文件的路径名
String getAbsolutePath() //得到一个文件的绝对路径名
String getParent() //得到一个文件的上一级路径名
String renameTo(File newname)
//将当前文件名更名为给定文件的完整路径
boolean exists() //判断指定的文件或目录是否存在
boolean mkdir() //创建文件对象...
Read article
「 JAVA 」
August 19, 2018
Words count
892
Reading time
1 mins.
实例:
package com.inspur.io;
import java.io.FileWriter;
/**
* Created by shirukai on 2017/7/26.
*
*/
public class Filewrite {
public static void main(String[] args){
Filewrite filewrite = new Filewrite();
filewrite.fileWrite();
}
public void...
Read article
「 JAVA 」
August 19, 2018
Words count
1.1k
Reading time
1 mins.
实例:
package com.inspur.io;
import java.io.File;
import java.io.FileReader;
/**
* Created by shirukai on 2017/7/26.
*
*/
public class Filereader {
public static void main(String[] agrs){
Filereader filereader = new Filereader();
filereader.fileReader...
Read article
「 JAVA 」
August 19, 2018
Words count
1.1k
Reading time
1 mins.
package com.inspur.io;
import java.io.File;
import java.io.FileInputStream;
/**
* Created by shirukai on 2017/7/26.
*
*/
public class Fileinputstream {
public static void main(String[] args){
Fileinputstream fileinputstream = new Fileinputstream...
Read article
「 JAVA 」
August 19, 2018
Words count
944
Reading time
1 mins.
package com.inspur.io;
import java.io.File;
import java.io.FileOutputStream;
/**
* Created by shirukai on 2017/7/26.
*
*/
public class Fileoutstream {
public static void main(String[] args){
Fileoutstream fileoutstream = new Fileoutstream()...
Read article