Is this really the version you are looking for? Kentico 9 documentation is no longer updated. Use the switch in the header to choose your Kentico version.

Working with physical files using the API

CMS.IO is a namespace that serves as an interlayer between the business layer of Kentico and storages used for physical files. CMS.IO is used throughout the system instead of the default System.IO library provided by the .NET Framework in order to be compatible with various types of file storages.

CMS.IO is an abstract layer, which accesses file storages by means of a provider built on top of it. CMS.IO defines the classes and their methods and properties, which the provider overrides in order to manipulate files in a storage.

Depending on the storage type that you use for your files, the system utilizes one of the following providers:

  • CMS.FileSystemStorage is used in the default installation which saves files to the Windows file system. The provider only wraps around the System.IO library.
  • CMS.AzureStorage employed when storing files in the Microsoft Azure blob storage.
  • CMS.AmazonStorage is used when you want to store files in the Amazon S3 storage service.

The following figure demonstrates how CMS.IO allows you to access different types of file storage by building providers:

Kentico accessing different types of file system

This documentation section assumes that you are familiar with the System.IO library and know how to use it to manipulate files and directories in the Windows file system. Learn how to use System.IO.

In this section