🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2102

Re: File.delete() can do so only on empty directories.

#2102
From: Joi Ellis [TeamB]
Date: Thu, 14 Jun 2001 17:53
22 lines
1702 bytes
Yonatan Taub <yonatanta@bashan.co.il> wrote:
> You can't delete an entire directory if it has files in it with the File
> class delete() method.
> This is most annoying!

Safety feature of most filesystems.

> How can I wipe a directory from out the face of my hard drive without
> worrying whether it has some files in it?

Write your own recursive delete function, or rely upon a Runtime.exec()
 to do it for you.  And be very, very paranoid that your app doesn't
accidently recursively delete from C:\.

I hesitate to trust apps that do this.


-- 
Joi Ellis (TeamB)               http://www.teamb.com/
No direct email, please.
For best results, post on news server newsgroups.borland.com!
Newsgroup Info: http://www.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <3b28fa16_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news-out.nibble.net!news-in.nibble.net!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news1.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnews!not-for-mail
References: <3b28f8e1_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,f563326bbc1cd1fa,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-06-14 11:01:28 PST
Message-ID: <3b28fa16_2@dnews>
From: "Joi Ellis [TeamB]" <joi@aravox.com>
Subject: Re: File.delete() can do so only on empty directories.
Newsgroups: borland.public.jbuilder.java.api
References: <3b28f8e1_2@dnews>
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.16-3 (i686))
NNTP-Posting-Host: 209.46.41.66
Date: 14 Jun 2001 10:53:27 -0700
X-Trace: dnews 992541207 209.46.41.66 (14 Jun 2001 10:53:27 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news-out.nibble.net!news-in.nibble.net!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news1.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnews!not-for-mail