Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: How to get the disk total space

Java: How to get the disk total space
{filelink=864}

import java.io.File;
public class DiskTotalSpace
 {
  public static void main(String[] args)
{
    File[] racines = File.listRoots();
    for (int i = 0; i < racines.length; i++)
  {
      System.out.println(racines[i]);
      System.out.println("Total space = " + racines[i].getTotalSpace());
      System.out.println();
    }
  }
}

Users who found this page were searching for:

  • find file input using python
  • java input dialogbox
  • day definition in calendar class python
  • python open file

No comments yet.

Leave a Comment