FileHelper Class |
Namespace: CMS.Helpers
public static class FileHelper
The FileHelper type exposes the following members.
Name | Description | |
---|---|---|
CheckExtension |
Checks if the extension is within the given list of allowed extensions.
| |
CloneControlSource |
Clones source codes (.ascx, .ascx.cs(vb), .designer.cs(vb)) for given control.
| |
CopyDirectory |
Copies specified directory including its subdirectories and all underlying files.
| |
DirectoryExists |
Checks if a URL resolves to an existing directory on the local file system.
| |
FileExists |
Checks if a URL resolves to an existing file on the local file system.
| |
FilesFolder |
Gets custom file folder path.
| |
FilesLocationType |
Gets the files location type.
| |
FilesMatch |
Checks if the content of two given files is same
| |
GetFileChecksum |
Gets file checksum
| |
GetFullFilePhysicalPath |
Returns full physical path of a file or folder. Does not change the ending slash
| |
GetFullFolderPhysicalPath |
Returns full physical path for a folder. Ensures the trailing slash.
| |
GetFullPhysicalPath |
Returns full path of the given path. Does not change the trailing slash
| |
GetLiveFilePath |
Gets the live path for the given file
| |
GetUniqueDirectoryName |
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.
| |
GetUniqueFileName |
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.
| |
IsMatch |
Indicates if file name matches given pattern.
| |
IsTextFileExtension |
Returns true if the given file extension represents a text file.
| |
ReplaceInFile(String, String, String) |
Performs the string replacement within the file.
| |
ReplaceInFile(String, String, String, Encoding) |
Performs the string replacement within the file.
| |
UseSiteSpecificCustomFolder |
Indicates if site specific custom folder should be used for storing files.
|