Re: File



Ravi wrote:
import java.io.File;
class FileDemo {
public static void main(String args[]) {
File f1 = new File("/home/ravi/abc");
System.out.println("Path: "+f1.getPath());
System.out.println("Absolute path:
"+f1.getAbsolutePath());
System.out.println("Size: "+f1.length());
System.out.println("getFreeSpace:
"+f1.getFreeSpace());
System.out.println("getTotalSpace:
"+f1.getTotalSpace());
System.out.println("getUsableSpace:
"+f1.getUsableSpace());
f1.deleteOnExit();
}
}

I use GNU/Linux and the problem is that the space reported by the thre
functions is not correct. Please explain.

What does it report, and why do you think it is wrong?

--
Eric Sosman
esosman@xxxxxxxxxxxxxxxxxxx
.



Relevant Pages

  • Re: File
    ... class FileDemo { ... public static void main(String args[]) { ... I use GNU/Linux and the problem is that the space reported by the thre ...
    (comp.lang.java.help)
  • File
    ... class FileDemo { ... public static void main(String args[]) { ... I use GNU/Linux and the problem is that the space reported by the thre ...
    (comp.lang.java.help)
  • Re: Perl Pro but Java Newbie: Need nudge in proper direction for my favorite Perl routine in Java
    ... public static void puts(String[] args) { ...
    (comp.lang.java.programmer)
  • Re: Graphics Problem
    ... > public static void main(Stringargs) throws Throwable { ... AWT Thread and Swing thread are distinct. ...
    (comp.lang.java.gui)
  • Re: Context.lookup
    ... public static void main(Stringargs) { ... Markus ... Prev by Date: ...
    (comp.lang.java.programmer)