Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Member
kmaca014
Posts: 3
Registered: ‎03-05-2012
My Device: Playbook
My Carrier: NA
Accepted Solution

mkdir in /tmp/ fails with ENOENT

Is there are reason 

 

const int result = mkdir("/tmp/SubDir", 0777); 

 

would fail for the playbook native SDK? I keep seeing a ENOENT error code returned, which would imply that the /tmp/ dir doesn't exist, which it certainly does. Is this perhaps an old SDK bug? Do I require a trailing path separator now, where I didn't before? Must the path string be char8/char16/char32?

 

Any more information would be great as I can't seem to find anything in the docs.

 

Kev

Please use plain text.
New Member
kmaca014
Posts: 3
Registered: ‎03-05-2012
My Device: Playbook
My Carrier: NA

Re: mkdir in /tmp/ fails with ENOENT

I should note that this is using SDK 2.0.

This functionality seemed to work fine before the official release. Even the betas worked correctly.
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: mkdir in /tmp/ fails with ENOENT

I'm pretty sure our apps can write only to ./tmp, not to /tmp.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
New Member
kmaca014
Posts: 3
Registered: ‎03-05-2012
My Device: Playbook
My Carrier: NA

Re: mkdir in /tmp/ fails with ENOENT

Thank you this is exaclty what I needed. It seems that there was no hard restriction before SDK2.0? I was able to write fine until now. Using the working dir tmp works just as well.

 

Thanks again,

Kev

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: mkdir in /tmp/ fails with ENOENT

I very much doubt SDK 2.0 affected this, but OS 2.0 may have. I thought it was like this in all the OS 2.0 betas, and actually I thought it was like that even under 1.0.8, but I'll readily admit to poor memory if I'm wrong on that...

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 660
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: mkdir in /tmp/ fails with ENOENT

/tmp isn't a full-featured filesystem either.  it has never supported directories.

 

Please use plain text.