[ad_1]
I need to use with Java the API File.
I would like to redirect in a specific path of Linux,
the goal is that to measure the disk space of a particular
partition, but I get the result of root partition.
This is the code:
final long GIGABYTE = 1073741824;
File file = new File("/dev/root");
float totalSpace = file.getTotalSpace() / GIGABYTE;
Seems that file charge only the root path --> /
Could I redirect file in a specific path ?
[ad_2]
لینک منبع