Click or drag to resize
FileHelper Class
File helper methods.
Inheritance Hierarchy
SystemObject
  CMS.HelpersFileHelper

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 9.0.0
Syntax
C#
public static class FileHelper

The FileHelper type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCloneControlSource
Clones source codes (.ascx, .ascx.cs(vb), .designer.cs(vb)) for given control.
Public methodStatic memberCopyDirectory
Copies specified directory including its subdirectories and all underlying files.
Public methodStatic memberDirectoryExists
Checks if a URL resolves to an existing directory on the local file system.
Public methodStatic memberFileExists
Checks if a URL resolves to an existing file on the local file system.
Public methodStatic memberFilesFolder
Gets custom file folder path.
Public methodStatic memberFilesLocationType
Gets the files location type.
Public methodStatic memberFilesMatch
Checks if the content of two given files is same
Public methodStatic memberGetFileChecksum
Gets file checksum
Public methodStatic memberGetFullFilePhysicalPath
Returns full physical path of a file or folder. Does not change the ending slash
Public methodStatic memberGetFullFolderPhysicalPath
Returns full physical path for a folder. Ensures the trailing backslash
Public methodStatic memberGetFullPhysicalPath
Returns full path of the given path. Does not change the trailing slash
Public methodStatic memberGetLiveFilePath
Gets the live path for the given file
Public methodStatic memberGetUniqueDirectoryName
Returns dirPath based on the given direPath which is unique within the parent folder. If the path is relative, relative path is returned, if the input path was absolute, absolute path is returned.
Public methodStatic memberGetUniqueFileName
Returns filePath based on the given filePath which is unique within the folder. If the path is relative, relative path is returned, if the input path was absolute, absolute path is returned.
Public methodStatic memberCheckExtension
Checks if the extension is within the given list of allowed extensions.
Public methodStatic memberIsMatch
Indicates if file name matches given pattern.
Public methodStatic memberIsTextFileExtension
Returns true if the given file extension represents a text file.
Public methodStatic memberReplaceInFile(String, String, String)
Performs the string replacement within the file.
Public methodStatic memberReplaceInFile(String, String, String, Encoding)
Performs the string replacement within the file.
Public methodStatic memberUseSiteSpecificCustomFolder
Indicates if site specific custom folder should be used for storing files.
Top
See Also