|
||
CMS.IO is a namespace that serves as an interlayer between the business layer of Kentico CMS and storages the application uses for physical files. It is used throughout the system instead of the default System.IO library provided by .NET Framework in order to be compatible with various types of file storages.
CMS.IO is an abstract layer, which accesses a file storage 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 application utilizes one of the following providers:
•CMS.CMSStorage is used in the default installation which saves its files to the Windows file system. The provider only wraps around the System.IO library.
•CMS.AzureStorage is a custom-written provider that is employed when storing files in the Windows Azure blob storage (see the Windows Azure Deployment Guide for more information).
•CMS.AmazonStorage is used when you want to store files in the Amazon S3 storage service.
The following figure demonstrates how CMS.IO enables you to easily add the support of different file storages by building providers using the storages' APIs:
To learn how to use the CMS.IO namespace to access files in your custom code, refer to the Using CMS.IO topic.
To learn how to write a custom storage provider, see the Writing a custom storage provider topic.
|
Please note
This chapter 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. If you're new to System.IO, we recommend reading its documentation first.
|