Class StorageProvider
Storage provider
public class StorageProvider : AbstractStorageProvider
- Inheritance
-
objectStorageProvider
- Inherited Members
- Extension Methods
Constructors
StorageProvider(string, string, bool)
Creates new instance of custom storage provider.
public StorageProvider(string externalStorageName, string providerAssemblyName, bool isSharedStorage)
Parameters
externalStorageNamestringExternal storage name. If used path translation to URL must be set explicitly. Use empty string if storage provider is working under application root.
providerAssemblyNamestringProvider assembly name with required implementations.
isSharedStorageboolIndicates whether the storage is shared between multiple instances.
Methods
CreateAmazonStorageProvider()
Creates new instance of storage provider for files hosted in Amazon S3 cloud storage.
[Obsolete("Use Kentico.Xperience.AmazonStorage.AmazonStorageProvider.Create() instead.", true)]
public static StorageProvider CreateAmazonStorageProvider()
Returns
CreateAzureStorageProvider()
Creates new instance of storage provider for files hosted in Azure cloud storage.
[Obsolete("Use Kentico.Xperience.AzureStorage.AzureStorageProvider.Create() instead.", true)]
public static StorageProvider CreateAzureStorageProvider()
Returns
CreateDirectoryProviderObject()
Creates new directory provider object
protected override AbstractDirectory CreateDirectoryProviderObject()
Returns
CreateFileProviderObject()
Creates new directory provider object
protected override AbstractFile CreateFileProviderObject()
Returns
CreateFileSystemStorageProvider(bool)
Creates new instance of storage provider for System.IO file system.
public static StorageProvider CreateFileSystemStorageProvider(bool isSharedStorage = false)
Parameters
isSharedStorageboolIndicates whether the storage is shared between web farm servers.
Returns
GetDirectoryInfo(string)
Returns new instance of directory info.
public override DirectoryInfo GetDirectoryInfo(string path)
Parameters
pathstringPath
Returns
GetFileInfo(string)
Returns new instance of FileInfo object.
public override FileInfo GetFileInfo(string fileName)
Parameters
fileNamestringFile name
Returns
GetFileStream(string, FileMode)
Returns new instance of file stream.
public override FileStream GetFileStream(string path, FileMode mode)
Parameters
pathstringPath to file
modeFileModeFile mode
Returns
GetFileStream(string, FileMode, FileAccess)
Returns new instance of file stream.
public override FileStream GetFileStream(string path, FileMode mode, FileAccess access)
Parameters
pathstringPath to file
modeFileModeFile mode
accessFileAccessFile access
Returns
GetFileStream(string, FileMode, FileAccess, FileShare)
Returns new instance of file stream.
public override FileStream GetFileStream(string path, FileMode mode, FileAccess access, FileShare share)
Parameters
pathstringPath to file
modeFileModeFile mode
accessFileAccessFile access
shareFileShareSharing permissions
Returns
GetFileStream(string, FileMode, FileAccess, FileShare, int)
Returns new instance of file stream.
public override FileStream GetFileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize)
Parameters
pathstringPath to file
modeFileModeFile mode
accessFileAccessFile access
shareFileShareSharing permissions
bufferSizeintBuffer size