Scroll

Create a Folder with the .NET API

The following is a quick explanation for how to create a Folder using the Exago .NET Api. This method assumes your configuration is using the file system, and not using a custom folder management solution.

Introduction

First, ensure that your application is referencing the ReportMgmtFileSystem class, which is located in the WebReports.Api.ReportMgmt namespace.

using WebReports.Api.ReportMgmt;

Next, ensure that your app has the correct permissions to access the intended file path.

Example

ReportMgmtFileSystem myFolders = new ReportMgmtFileSystem(myApi.PageInfo);

myFolders.AddFolder("ParentFolder", "NewFolder");

Breakdown

ReportMgmtFileSystem myFolders = new ReportMgmtFileSystem(PageInfo, "ReportPath");

In order to use the .NET API to access the report file system, you will need to instantiate a ReportMgmtFileSystem object. The constructor takes two arguments: Your Api object's PageInfo class, and optionally a path to the report repository (if this is not set, the class will use the report path specified in your configuration file).

myFolders.AddFolder("ParentFolder", "NewFolder");

The ReportMgmtFileSystem class contains a variety of methods for folder and report management. To add a new folder, use the AddFolder method, which takes two arguments: A path to a parent folder, and the name of the new folder to be created within the parent folder.


Hidden Article Information

Article Author
Exago Development
created 2016-08-29 17:11:45 UTC
updated 2017-02-21 16:45:20 UTC

Labels
Folder Management, How Do I, API, .NET, windows folder configuration, How-To, dotnet, folder, file system,
Have more questions? Submit a request