[Ikvm-developers] Problem with File.mkdirs() for files in the root of the filesystem
Brought to you by:
jfrijters
From: Bogdan L. <la...@po...> - 2005-08-03 09:58:03
|
Hi, There is a problem with the IKVM implementation of VMFile. I have a code like this: import java.io.*; public class filetest { public static void main(String[] args) { File f = new File("C:\\myfile.txt"); File parentFile = f.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } } } Basically it should do nothing (if the C:\ drive is available) however when I run this example after converting java code into .NET I get: Exception in thread "main" java.lang.NullPointerException at java.io.VMFile.mkdir (VMFile.java:196) at java.io.File.mkdir (File.java:1001) at java.io.File.mkdirs (File.java:1018) at filetest.main (filetest.java:10) Can you please fix it? Thanks! Regards, Bogdan |