DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=38105>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38105 ------- Additional Comments From [EMAIL PROTECTED] 2006-01-15 23:30 ------- On WindowsXP exists a special file (hiberfil.sys) for hibernation mode. When i try to determine if this file exists (with java.io.File or VFS) the result is FALSE. (Regardless if it really exists or not). (This seems to be a bug in JDK: 6192331.) So with java.io.File i can determin the size of this file but with VFS i can`t. ------------------------------------- Example (Code): import java.io.File; import org.apache.commons.vfs.*; public class Hiberfil { public static void main(String[] args) { String path = "C:\\hiberfil.sys"; printFile(path); printFileObject(path); } static void printFile(String path) { File f = new File(path); System.out.println("File.Exists -> "+f.exists()); System.out.println("File.Length -> "+f.length()); } static void printFileObject(String path) { try { FileObject fo = VFS.getManager().resolveFile(path); System.out.println("FileObject.Exists -> "+fo.exists()); System.out.println("FileObject.Content.Size -> "+fo.getContent().getSize()); } catch (FileSystemException e) { e.printStackTrace(); } } } ------------------------------------- Example (Output): File.Exists -> false File.Length -> 469291008 FileObject.Exists -> false org.apache.commons.vfs.FileSystemException: Could not determine the size of "file:///C:/hiberfil.sys" because it is not a file. at org.apache.commons.vfs.provider.DefaultFileContent.getSize(DefaultFileContent.java:126) at VFSTest.Hiberfil.printFileObject(Hiberfil.java:24) at VFSTest.Hiberfil.main(Hiberfil.java:11) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
