Re: directory size
From: Roedy Green (look-on_at_mindprod.com.invalid)
Date: 07/06/04
- Next message: Boudewijn Dijkstra: "Re: gotchas.html: Missing Hex"
- Previous message: Roedy Green: "Re: beware: herein demons lie with JEditorPane"
- In reply to: Dale King: "Re: directory size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 06 Jul 2004 18:19:59 GMT
On Sun, 4 Jul 2004 18:59:56 GMT-5, DaleKing@newsrvr.tce.com (Dale
King) wrote or quoted :
>But be aware that the file size you get in Java is the size of
>the logical contents of the file not the amount of disk space
>taken up. Such a method will tell you that 100 files that only
>contain 1 byte are the same size as 1 file of 100 bytes. In
>reality the amount of disk sace taken is vastly different.
I don't think there is any way in pure Java you can get the overhead
size. You would need some JNI to find out the cluster size, and round
the java sizes up, possibly adding some overhead for the directory
entries.
There are the further complications in W2K of compressed files and
short files stored in the directory itself.
-- Canadian Mind Products, Roedy Green. Coaching, problem solving, economical contract programming. See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
- Next message: Boudewijn Dijkstra: "Re: gotchas.html: Missing Hex"
- Previous message: Roedy Green: "Re: beware: herein demons lie with JEditorPane"
- In reply to: Dale King: "Re: directory size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|