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


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

Re: deleting files

Started bydagon@dagon.net (Dagon)
First post2011-01-28 14:17 -0800
Last post2011-01-29 13:58 -0800
Articles 4 — 3 participants

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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
    Re: deleting files Roedy Green <see_website@mindprod.com.invalid> - 2011-01-29 14:02 -0800
    Re: deleting files Roedy Green <see_website@mindprod.com.invalid> - 2011-01-29 13:58 -0800

#25596 — Re: deleting files

Fromdagon@dagon.net (Dagon)
Date2011-01-28 14:17 -0800
SubjectRe: deleting files
Message-ID<hsrb18-v04.ln1@dagon.net>
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/>  

[toc] | [next] | [standalone]


#25926

From"Mike Schilling" <mscottschilling@hotmail.com>
Date2011-01-28 20:20 -0800
Message-ID<ii04iv$25k$1@news.eternal-september.org>
In reply to#25596

"Dagon" <dagon@dagon.net> wrote in message news:hsrb18-v04.ln1@dagon.net...
>
> My WAG is that the utility is using OS-specific calls and knowledge that 
> are
> faster than the more general abstractions in the JDK.

Mine too.  (And given how long it takes to delete a big directory tree in 
the Explorer, I'd guess that the utility is faster than that too.)
 

[toc] | [prev] | [next] | [standalone]


#26108

FromRoedy Green <see_website@mindprod.com.invalid>
Date2011-01-29 14:02 -0800
Message-ID<bc39k6lrk857n96grjd77o7jf4osso73uq@4ax.com>
In reply to#25596
On Fri, 28 Jan 2011 14:17:21 -0800, dagon@dagon.net (Dagon) wrote,
quoted or indirectly quoted someone who said :

>You don't give us enough information about the utility or your code to expect
>that anyone's experiments are directly relevant. 
 
I was hoping someone had written some file deleting in C and knew why
it would be faster and able to kill more files than my Java code.
The C program I have been referring to is called Ace Utilities. Back
in the 16 bit days I had ways of tracing any code to find out how they
pulled off their magic. But I have no such tool for 32 or 64 bit code
and presumably programs now are so huge it would be quite hard to find
the code of interest.

The hope was, perhaps with a bit of JNI, I could pull off c-speed and
power.

I guess it may have something to do with ownership, and somehow
overriding that ownership to kill files, or possibly overriding
in-use.

-- 
Roedy Green Canadian Mind Products
http://mindprod.com
To err is human, but to really foul things up requires a computer.
~ Farmer's Almanac
It is breathtaking how a misplaced comma in a computer program can
shred megabytes of data in seconds.

[toc] | [prev] | [next] | [standalone]


#26162

FromRoedy Green <see_website@mindprod.com.invalid>
Date2011-01-29 13:58 -0800
Message-ID<bb39k6lnfds79ib294dvb6ltg6rbgom7c0@4ax.com>
In reply to#25596
On Fri, 28 Jan 2011 14:17:21 -0800, dagon@dagon.net (Dagon) wrote,
quoted or indirectly quoted someone who said :

>What does this mean?  A File for which delete() returns false? 
yes.  You have no idea what the problem is.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
To err is human, but to really foul things up requires a computer.
~ Farmer's Almanac
It is breathtaking how a misplaced comma in a computer program can
shred megabytes of data in seconds.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web