Will Java5 return size of directory, including contents?

Posted on 2007-10-16
Last Modified: 2011-04-14
Dear Experts,

Can Java5 return the total bytes within a directory, without me needing to traverse the whole thing and count them up?  I'm a bad counter.

Question by:BrianMc1958
    LVL 86

    Accepted Solution

    In a word,  no ;-)
    LVL 86

    Expert Comment

    >> I'm a bad counter.

    Don't worry - it won't be you that's doing it ;-)
    LVL 86

    Expert Comment


    You could always Runtime.exec dir or ls of course

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    Title # Comments Views Activity
    Multiple issues with Java 14 37
    PGP Decryption code using Bouncy Castle jars 11 68
    Problem to setup 18 65
    maven java path setting 5 31
    This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
    Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
    This video teaches viewers about errors in exception handling.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now