cancel
Showing results for 
Search instead for 
Did you mean: 

How can I access at runtime all the files stored under current mimes

Former Member
0 Kudos

Hi Guys,

How can I access at runtime all the files stored under current mimes/components/<My Comp>/<myPictures>.

I would like to have access at runtime to all the pictures stored under the above folder.

Is there such available API.

many thanks

Harry

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member192434
Active Contributor
0 Kudos

Hi Harry ,

use this code to access the file at run time

Note: Put the correct file path

IWDResource res = WDResourceFactory.createResource(

new FileInputStream(FilePath"
"
wdContext.currentContextElement().getDirectory()

+wdContext.currentContextElement().getFileName()), wdContext.currentContextElement().getFileName(),

WDWebResourceType.DOC, true);

wdComponentAPI.getMessageManager().reportSuccess("=="+FilePath);

IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(

res.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal()),

res.getResourceName());

window.show();

} catch (FileNotFoundException e) {

// ..

}

Thanks