Topic
  • 1 reply
  • Latest Post - ‏2013-08-06T22:38:37Z by Sunorth
konapalligopi
konapalligopi
6 Posts

Pinned topic Is there any way to create FileStorage Using CE API in the code?

‏2013-07-31T02:49:07Z |

Hi ,

 

We have a requirement with storage areas. We need to create  storage areas for every month so we want to automate this with by writing some code. Is there any way to create File storage areas with CE API. please suggest me.

Thank you.

  • Sunorth
    Sunorth
    16 Posts

    Re: Is there any way to create FileStorage Using CE API in the code?

    ‏2013-08-06T22:38:37Z  

    yes, see the sample :

     

                        FileStorageArea fsa = (FileStorageArea)Factory.FileStorageArea.createInstance(objectStore, null);
                        //
                        // Set name and description.
                        fsa.set_RootDirectoryPath(strFSRootPath);
                        fsa.set_DisplayName(strStorageAreaName);
                        fsa.set_DescriptiveText(" some desc");
                        //
                        // Save
                        fsa.save( RefreshMode.REFRESH);