New to Telerik Reporting? Start a free 30-day trial

Interface defining specialized storage operations for resource management in the WebReportDesigner system.

Extends IAssetsStorage with additional resource-specific functionality including name-based operations, move operations, overwrite capabilities, and search functionality. Provides comprehensive resource management for the Assets Manager and related WebReportDesigner components.

Definition

Methods

Determines if a folder exists by its URI.

C#
bool FolderExists(string uri)
Parameters:uristring

The unique resource identifier (URI) of the folder.

Returns:

bool

true, if the folder exists, else false

Provides URI-based folder existence checking for validation and resource management operations. Consider using GetFolderAsync for more comprehensive folder information.

Determines if a folder contains any resources or subfolders.

C#
bool FolderHasContents(string uri)
Parameters:uristring

The unique resource identifier (URI) of the folder

Returns:

bool

true, if the folder has contents, else false

Useful for UI optimizations to determine whether to show folder expansion indicators and for validation before folder operations. Consider using GetFolderContentsAsync for more detailed content information.

Determines if a folder exists by its name path.

C#
bool FolderNameExists(string folderName)
Parameters:folderNamestring

The path to the folder using Name identifiers.

Returns:

bool

true, if the folder exists, else false

Provides name-based folder existence checking for validation operations and hierarchical folder management scenarios.

Retrieves all resource files that match the specified file extensions.

C#
IEnumerable<ResourceFileModel> GetAllByExtension(string[] extensions)
Parameters:extensionsstring[]

The file extensions to filter by (e.g., ".jpg", ".png").

Returns:

IEnumerable<ResourceFileModel>

An enumerable collection of ResourceFileModel objects matching the specified extensions.

Useful for filtering resources by type in the Assets Manager, enabling users to view only specific file types such as images or documents.

Retrieves the raw content of a resource by its URI.

C#
byte[] GetByUri(string uri)
Parameters:uristring

The unique resource identifier (URI) of the resource.

Returns:

byte[]

The resource content as a byte array.

Provides direct access to resource binary data for processing, manipulation, or serving operations within the WebReportDesigner system.

Retrieves a resource file with download-ready data and metadata.

C#
ResourceFileDataModel GetFile(string resourceUri)
Parameters:resourceUristring

The URI of the resource.

Returns:

ResourceFileDataModel

ResourceFileDataModel, containing the information about the resource.

Combines resource content with metadata including MIME type and name, optimized for download operations and HTTP response scenarios.

Retrieves the folder model by its name path.

C#
ResourceFolderModel GetFolderByName(string folderName)
Parameters:folderNamestring

The path to the folder using Name identifiers.

Returns:

ResourceFolderModel

The ResourceFolderModel of the obtained folder.

Enables folder lookup using hierarchical name paths rather than URIs, providing an alternative access method for folder navigation operations.

Retrieves resource information by its name path.

C#
ResourceFileModel GetModelByName(string resourceName)
Parameters:resourceNamestring

The full path to the resource using Name identifiers.

Returns:

ResourceFileModel

ResourceFileModel, containing the information about the resource.

Enables resource lookup using hierarchical name paths rather than URIs, providing an alternative access method for resource management operations.

Moves a resource to a new parent location.

C#
ResourceFileModel Move(MoveResourceModel model)
Parameters:modelMoveResourceModel

The model containing the move operation data

Returns:

ResourceFileModel

ResourceFileModel, containing the information about the moved resource.

Relocates the resource file while preserving its content and updating all necessary references within the storage system.

Moves a folder and all its contents to a new parent location.

C#
ResourceFolderModel MoveFolder(MoveFolderModel model)
Parameters:modelMoveFolderModel

The model containing the move operation data

Returns:

ResourceFolderModel

The ResourceFolderModel of the moved folder

Relocates the entire folder structure while preserving all contents and maintaining referential integrity within the storage system.

Overwrites an existing resource with new content.

C#
ResourceFileModel Overwrite(OverwriteResourceModel model, byte[] resource)
Parameters:modelOverwriteResourceModel

The model containing the overwrite operation data

resourcebyte[]

The new contents of the resource

Returns:

ResourceFileModel

ResourceFileModel, containing the information about the updated resource.

Replaces the content of an existing resource while preserving its location and basic metadata, useful for updating resources without changing their references.

Determines if a resource exists at the specified URI.

C#
bool ResourceExists(string uri)
Parameters:uristring

The unique resource identifier (URI) of the resource.

Returns:

bool

true, if the resource exists, else false.

Enables validation of resource references and existence checking before performing operations that depend on resource availability.

Determines if a resource exists by its name path.

C#
bool ResourceNameExists(string resourceName)
Parameters:resourceNamestring

The full path to the resource using Name identifiers.

Returns:

bool

true, if the resource exists, else false.

Provides name-based resource existence checking for validation operations and resource management scenarios that use hierarchical naming.

Saves resource content and returns the file location.

C#
[Obsolete("Telerik.WebReportDesigner.Services.IResourceStorage.Save(string, byte[]) is now obsolete. Please use Telerik.WebReportDesigner.Services.IResourceStorage.Save(SaveResourceModel, byte[])", false)]
string Save(string resourceName, byte[] resource)
Parameters:resourceNamestring

The name and path of the resource to save.

resourcebyte[]

The resource content as a byte array.

Returns:

string

The file location string.

This method is obsolete. Use the overload that accepts SaveResourceModel for better parameter validation and consistent API patterns.

Searches for resources within a specified folder using pattern matching.

C#
IEnumerable<ResourceModelBase> Search(SearchResourcesModel model)
Parameters:modelSearchResourcesModel

The model containing the search operation data

Returns:

IEnumerable<ResourceModelBase>

The search results, both files and folders, as an enumerable of ResourceModelBase

Enables pattern-based resource discovery within specific folder scopes, supporting search functionality in the Assets Manager and resource management interfaces.