Click or drag to resize
StorageHelper Class
Class providing helper methods for storage providers management.
Inheritance Hierarchy
SystemObject
  CMS.IOStorageHelper

Namespace: CMS.IO
Assembly: CMS.IO (in CMS.IO.dll) Version: 11.0.0
Syntax
C#
public static class StorageHelper

The StorageHelper type exposes the following members.

Fields
  NameDescription
Public fieldStatic memberBUFFER_SIZE Obsolete.
Buffer size 64 kB.
Public fieldStatic memberDEFAULT_IMAGES_PATH
Default path to the images folder
Top
Properties
  NameDescription
Public propertyStatic memberIsDefaultStorageExternal Obsolete.
Returns whether current instance running on external storage.
Public propertyStatic memberUseZippedResources
If true, the system is allowed to use zipped resources such as SQL installation scripts, web templates, or images
Top
Methods
  NameDescription
Public methodStatic memberCopyFileAcrossProviders
Copies two files across different storage providers
Public methodStatic memberDeleteOldFiles(String, DateTime, Boolean)
Deletes files older than specified time from the file system.
Public methodStatic memberDeleteOldFiles(DirectoryInfo, DateTime, Boolean)
Deletes files older than specified time from the file system.
Public methodStatic memberGetDirectoryInfo
Returns new instance of directory info.
Public methodStatic memberGetFileInfo
Returns new instance of FileInfo object.
Public methodStatic memberGetFileStream(String, FileMode)
Returns new instance of file stream.
Public methodStatic memberGetFileStream(String, FileMode, FileAccess)
Returns new instance of file stream.
Public methodStatic memberGetFileStream(String, FileMode, FileAccess, FileShare)
Returns new instance of file stream.
Public methodStatic memberGetFileStream(String, FileMode, FileAccess, FileShare, Int32)
Returns new instance of file stream.
Public methodStatic memberGetFullFilePhysicalPath
Returns full physical path of a file or folder. Does not change the ending slash
Public methodStatic memberGetImageUrl
Gets the real file path for the given path (for zip returns the path to the zip file)
Public methodStatic memberGetRealFilePath
Gets the real file path for the given path (for zip returns the path to the zip file)
Public methodStatic memberGetStorageProvider
Gets the storage provider based on the given path, updates the path so it matches the provider internal structure
Public methodStatic memberGetWebApplicationRelativePath
Converts the given physical path to an application relative path
Public methodStatic memberIsExternalFileStream Obsolete.
Returns true, if the given file stream is bound to an external source
Public methodStatic memberIsExternalStorage
Returns whether the path is targeting an external storage.
Public methodStatic memberIsSameStorageProvider
Returns true, if two given paths use the same storage provider
Public methodStatic memberIsSharedStorage
Returns whether the path is targeting a shared storage.
Public methodStatic memberIsZippedFilePath
Returns true if the given path is a path to the zipped file
Public methodStatic memberLogDeleteFileTask Obsolete.
Logs the file delete task for the web farm server
Public methodStatic memberLogDirectoryDeleteTask Obsolete.
Logs the directory delete task for the web farm server
Public methodStatic memberLogUpdateFileTask Obsolete.
Logs the file update task for the web farm server
Public methodStatic memberMapStoragePath
Maps the given storage path to a specific provider
Public methodStatic memberMapZippedFolders Obsolete.
Maps the automatic zipped folders
Public methodStatic memberMoveFileAcrossProviders
Copies two files across different storage providers
Public methodStatic memberSaveBinaryDataToDisk
Saves the file from given byte array to the file system.
Public methodStatic memberSaveFileToDisk
Saves the given file to the disk file
Public methodStatic memberSaveStreamToDisk
Saves the file from given stream to the file system.
Public methodStatic memberUnMapStoragePath
Removes the mapping to a storage provider
Public methodStatic memberUseLocalFileSystemForPath
Maps the given storage path to a local file system provider
Top
See Also