AIR File.resolvePath won't work anymore

Posted by Palleas on Stack Overflow See other posts from Stack Overflow or by Palleas
Published on 2010-04-23T14:40:16Z Indexed on 2010/04/23 14:43 UTC
Read the original article Hit count: 222

Filed under:
|
|

Hi all,

I'm having a very strange issue, it looks like my application can't create file anymore. It works w/ directories, but the so-many-times-used resolvePath() methods doesn't. Here is what I do :

var databaseFileContent : File = new File(File.desktopDirectory.nativePath + "/testing");
databaseFileContent.createDirectory();
databaseFileContent.resolvePath("test");

(Here I'm trying on desktop but that's the same w/ applicationStorageDirectory)

When I execute this, it works only for the "testing" folder which is actually created, but my file isn't. I tried to create another application, doing this :

trace(File.desktopDirectory.resolvePath("maiswtf.db").exists);
trace(File.applicationStorageDirectory.resolvePath("wtf.db").exists);

Both are displaying "false". Am I missing something here? I have another application with this code :

var databaseFileContent : File = File.applicationStorageDirectory.resolvePath(File.separator + "sitra.db");

When I run this one, it works perfectly! My file is created at /sitra.db!

Any hints? I thinks I'm going mad :/

Thanks!

© Stack Overflow or respective owner

Related posts about air

Related posts about adobe-air