Re: directory size

From: Dale King (DaleKing_at_newsrvr.tce.com)
Date: 07/04/04


Date: Sun, 4 Jul 2004 18:59:56 GMT-5

Hello, Roedy Green !
You wrote:

> On Thu, 01 Jul 2004 16:50:13 +0100, "Craig H."
> <spam@[at]thehurley.[dot]com> wrote or quoted :
>
> >Once I have a handle to a directory, how can I get the size of
it?
>
> you must add up the sizes of the files and directories in it.

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.

-- 
 Dale King
 My Blog: http://daleking.homedns.org/Blog


Relevant Pages

  • Re: Here I am
    ... You can Set it to use whatever amount of Disk Space you want ... It *can* be Set to different Sizes on each Drive, ... Default Setting of 10 % of the Drive, for all Drives. ...
    (uk.people.silversurfers)
  • Re: XP Pro.. making space?
    ... You can try limiting the amount ... save a chunk of hard disk space ... When I look to try and tune the system restore feature, ... shutdown option of 'sleep' to 'shutdown' when the start menu was set to ...
    (uk.comp.homebuilt)
  • Re: registry cleaner
    ... The amount of disk space used by left-over registry ... Registry cleaners often claim to speed up your machine by ... removing such entries. ...
    (microsoft.public.windowsxp.general)
  • Re: Limit folder (with subfolders) capacity
    ... nobody, apache, LOCAL SYSTEM or whatever. ... quotas work over system users. ... But each user is assigned their own directory, and he can limit the amount of space used by that directory. ... Both Linux and Windows 2003 Server allow you to limit the amount of disk space used by a single directory. ...
    (comp.lang.php)
  • Re: directory size
    ... >the logical contents of the file not the amount of disk space ... >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 ...
    (comp.lang.java.help)