Advertisement
LightProgrammer000

Dados_CPU

May 7th, 2020
1,322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. package PXTI_002;
  2.  
  3. import java.io.*;
  4. import java.nio.file.*;
  5.  
  6. public class Dados_Cpu
  7. {
  8.     public static void main(String[] args) throws IOException
  9.     {
  10.         FileSystem fs = FileSystems.getDefault();
  11.        
  12.         for (FileStore store : fs.getFileStores())
  13.         {
  14.             System.out.println("Unidade:" + store.toString());
  15.             System.out.println("Total:" + store.getTotalSpace());
  16.             System.out.println("Disponivel:" + store.getUsableSpace());
  17.             System.out.println("Utilizada:" + (store.getTotalSpace() - store.getUsableSpace()));
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement