Class FileHelp
A helper class for file transfer.
Inheritance
Inherited Members
Namespace: EPiServer.Core.Transfer
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public static class FileHelp
Methods
AddPlaceHolders(String)
Replaces place holders to the URL. Eg {EPsUploadDir} and {EPsRootDir}
Declaration
public static string AddPlaceHolders(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The URL. |
Returns
Type | Description |
---|---|
System.String | A string reprensenting the replaced URL. |
IsInternalAny(String)
Determines whether a string starts with / or {EP and is treated as a link.
Declaration
public static bool IsInternalAny(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | The string to examine. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsInternalLink(String)
Determines whether a string starts with / or {EP and ands with aspx and is treated as a handled link.
Declaration
public static bool IsInternalLink(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | The string to examine. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsLocalFile(String)
Determines whether a string starts with / or {EP and is treated as a file link.
Declaration
public static bool IsLocalFile(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | The string to examine. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ReplacePlaceHolders(String)
Replaces the place holders ({EPsUploadDir}, {EPsRootDir}) with the sites mapped paths.
Declaration
public static string ReplacePlaceHolders(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The file path. |
Returns
Type | Description |
---|---|
System.String |
ReplacePlaceHolders(String, String, String)
Replaces the place holders ({EPsUploadDir}, {EPsRootDir}) with the given values.
Declaration
public static string ReplacePlaceHolders(string filePath, string rootDir, string pageUploadDir)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The file path to replace. |
System.String | rootDir | The root dir. |
System.String | pageUploadDir | The page upload dir. |
Returns
Type | Description |
---|---|
System.String | A replaced string. |