Chris
2005-03-17 07:02:15 UTC
Howdy,
When using File.length to get the size of a file on linux, it returns 0;
but I am sure the file has contents, Could someone give me a hint?
Thanks in advance .
//test.java
import java.io.*;
public class test
{
public static void main(String args[])
{
File file = new File("/proc/mdstat");
System.out.println("file.length(): " + file.length());
}
}
When using File.length to get the size of a file on linux, it returns 0;
but I am sure the file has contents, Could someone give me a hint?
Thanks in advance .
//test.java
import java.io.*;
public class test
{
public static void main(String args[])
{
File file = new File("/proc/mdstat");
System.out.println("file.length(): " + file.length());
}
}