Class IOHelperExtensions
Inheritance
System.Object
      Namespace: Umbraco.Extensions
Assembly: Umbraco.Core.dll
Syntax
public static class IOHelperExtensionsMethods
View SourceCreateRandomFileName(IIOHelper)
Declaration
public static string CreateRandomFileName(this IIOHelper ioHelper)Parameters
| Type | Name | Description | 
|---|---|---|
| IIOHelper | ioHelper | 
Returns
| Type | Description | 
|---|---|
| System.String | 
ResolveRelativeOrVirtualUrl(IIOHelper, String)
Will resolve a virtual path URL to an absolute path, else if it is not a virtual path (i.e. starts with ~/) then it will just return the path as-is (relative).
Declaration
public static string ResolveRelativeOrVirtualUrl(this IIOHelper ioHelper, string path)Parameters
| Type | Name | Description | 
|---|---|---|
| IIOHelper | ioHelper | |
| System.String | path | 
Returns
| Type | Description | 
|---|---|
| System.String | 
TryCreateDirectory(IIOHelper, String)
Tries to create a directory.
Declaration
public static bool TryCreateDirectory(this IIOHelper ioHelper, string dir)Parameters
| Type | Name | Description | 
|---|---|---|
| IIOHelper | ioHelper | The IOHelper. | 
| System.String | dir | the directory path. | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the directory was created, false otherwise. |