看板java
标 题Re: [问题] 如何利用程式码去执行砍档的功能
发信站静宜大学BBS站 (Mon Jul 10 21:48:44 2006)
转信站ptt!ctu-reader!Spring!news.nctu!news.ntu!news.ee.ttu!news.cis.nctu!PUB
查一下 API 吧!
http://java.sun.com/j2se/1.5.0/docs/api/
java.io.File
public boolean delete()
Requests that the file or directory denoted by this abstract pathname be deleted when the virtual machine terminates. Deletion will be attempted only for norm
al termination of the virtual machine, as defined by the Java Language Specification.
※ 引述《[email protected] (squallindex)》之铭言:
> 不好意思想请问一下
> 之前在学java或者是jsp的时候
> 书上所学或者是范例程式
> 都只要教会我们如何去建档.写入档案.读档.或者是JSP中的上传档案
> 但就是没有介绍到删除档案的写法
> 最近在写JSP
> 刚好有写到上传图档的功能
> 但想说有的时候有些图档已经没有存在的必要性
> 为了减少不必要的负担
> 所以需要执行删除不需要图档的功能
> 但是翻遍的手上的工具书就是没有相关的介绍
> 因此完全不知道该怎麽下手
> 请问一下如果要写出这样的功能大概要如何下手呢?
--
以後成就来自於现在的自我要求
--
╭─╮╭ ╮┌─╮┌─╮╭─╮╭────‧★☆ PU-BBS ☆★‧────╮
├─╯│ │├─╮├─╮╰─╮ 静 宜 大 学 ⊙ 计 中
╰ ╰═╯└─╯└─╯╰─╯╰───‧ [ pu.twbbs.org ] ‧───╯
Author: nopqr 从 静宜大学BBS站 发表