Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #25596

Re: deleting files

From dagon@dagon.net (Dagon)
Newsgroups comp.lang.java.programmer
Subject Re: deleting files
Date 2011-01-28 14:17 -0800
Organization Dagon.net
Message-ID <hsrb18-v04.ln1@dagon.net> (permalink)
References <kc46k65u61goegok3j9heoc5t5juh78k13@4ax.com>

Show all headers | View raw


Roedy Green  <see_website@mindprod.com.invalid> wrote:
>I wrote a program to tidy up my hard disk. I run it as administrator.
>It tells me there are a fair number of junk files I cannot delete.

What does this mean?  A File for which delete() returns false?  There's a lot
of reasons this can happen.

>I have a utility, presumably written in C, that much more rapidly scans
>my drive for junk and manages to wipe out much of the junk I could
>not.

Yup. 

>I curious if anyone has experimented and could tell me:
>1. why in the C utility is so much faster than my utility. My code is
>basically just a bunch of File.list() with filters. What Java doing to
>dither?

You don't give us enough information about the utility or your code to expect
that anyone's experiments are directly relevant.  

My WAG is that the utility is using OS-specific calls and knowledge that are
faster than the more general abstractions in the JDK.

>2. What is the utility doing to let it kill more files?

It depends on why you can't delete the files to start with.  Most likely it's
the same answer: OS-specific knowledge and calls in the utility.
--
Mark Rafn    dagon@dagon.net    <http://www.dagon.net/>  

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar


Thread

Re: deleting files dagon@dagon.net (Dagon) - 2011-01-28 14:17 -0800
  Re: deleting files "Mike Schilling" <mscottschilling@hotmail.com> - 2011-01-28 20:20 -0800

csiph-web