SaaS CMS has officially launched! Learn more now.

Class FileHelp

A helper class for file transfer.

Inheritance
System.Object
FileHelp
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core.Transfer
Assembly: EPiServer.dll
Version: 7.19.2
Syntax
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

true if should be treated as a link; otherwise, false.

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

true if should be treated as a link; otherwise, false.

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

true if should be treated as a file link; otherwise, false.

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.