怎么搜索啊??
不好意思,我到现在都还不知道怎么进行CSDN的搜索!!
求教了

解决方案 »

  1.   

    windows 下的函数
    BOOL GetDiskFreeSpaceEx( 
    LPCWSTR  lpDirectoryName, 
    PULARGE_INTEGER   lpFreeBytesAvailableToCaller, 
    PULARGE_INTEGER   lpTotalNumberOfBytes, 
    PULARGE_INTEGER   lpTotalNumberOfFreeBytes );
      

  2.   

    前几天帖子见过
    转import java.io.*;
    public class execDir{
        public static void main(String[] args){
           try{ 
              Process p = Runtime.getRuntime().exec("cmd /c dir c:\\");
              InputStream ips = p.getInputStream();
              BufferedReader bf = new BufferedReader(new InputStreamReader(ips));
              String s=null;
      while((s = bf.readLine()) != null) System.out.println(s);
      bf.close();
         }
         catch(IOException e){
         e.printStackTrace();
         }
    }