close

The method , delete() , of File class can be used to delete the file.

 

File f = new File(file Name);

boolean success = f.delete();

if (!success) 

{

System.out.println("delete fail!!");

}

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 JerryCheng 的頭像
    JerryCheng

    KwCheng's blog

    JerryCheng 發表在 痞客邦 留言(0) 人氣()