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
Highlighted
Developer
Posts: 146
Registered: ‎07-03-2013
My Device: BB 9360
My Carrier: WIND
Accepted Solution

Create Directory in SD Card location

Hello, 
I was just wondering, is it possible to create a directory and then copy a file to a particular location in the sdcard. 

the path in the sd card that currently exists (returns true) is :

QString path = QDir::currentPath() + "/../../removable/sdcard";

//returns true
qDebug() << "path exists? " << QDir(path).exists(); 

 

I am trying to create a new path by:

// this if clause never gets executed (hence, returns false)
if(dir.mkpath(path +"/MyDir")){ ... }

 

btw, I dont have shared_files permission checked. does it matter? 

 

Thanks

S.

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Create Directory in SD Card location

Yes it does, you'll need to set the access_shared permission.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 146
Registered: ‎07-03-2013
My Device: BB 9360
My Carrier: WIND

Re: Create Directory in SD Card location

Awesome! it does require "access_shared " permissions!

 

Thanks!