Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Unable to re-create folder using IWPageGeneration
AdarshKukanur
Hi,
We have a requirement where we need to autocreate folders within which the DCR will be saved. We used the IWPageGeneration.setOutputFile() method for the same .
When we created new folders , there was no issue. However , when a folder was deleted and we tried to create the same folder , we were unable to do so . The code was not able to execute .
The deleted folder had been "submitted" .
If someone has faced a similar issue or has any insights into the same , kindly let us know .
Thanks,
Dhruba
Find more posts tagged with
Comments
Rick Poulin
How are you creating the folder?
One common mistake when using the CSSDK is to assume that just because csclient.getFile() returned a non-null value, that the directory exists. What's probably happening in your case is that it's returning an instance of CSHole. So if your code reads
[PHP]
if (csclient.getFile(new CSVPath(dirpath)) == null) {
// create dir
}[/PHP]
then modify it to this:
[PHP]
CSFile dir = csclient.getFile(new CSVPath(dirpath));
if (dir == null || dir.getKind() == CSHole.KIND) {
// create dir
}[/PHP]
If that's not it, you'll have to clarify what you mean by "we're unable to create the folder".