Table of Contents

Class PathHelper

Namespace
Kentico.Xperience.AmazonStorage
Assembly
Kentico.Xperience.AmazonStorage.dll

Contains helper methods for conversion between NTFS and Amazon S3 storage.

public static class PathHelper
Inheritance
object
PathHelper

Properties

CachePath

Gets or sets path to local storage for cache.

public static string CachePath { get; set; }

Property Value

string

CurrentDirectory

Gets or sets current directory.

public static string CurrentDirectory { get; set; }

Property Value

string

TempPath

Gets or sets path to local storage for temp.

public static string TempPath { get; set; }

Property Value

string

Methods

GetObjectKeyFromPath(string)

Returns object key from given path.

public static string GetObjectKeyFromPath(string path)

Parameters

path string

Path.

Returns

string

GetObjectKeyFromPath(string, bool)

Returns object key from given path.

public static string GetObjectKeyFromPath(string path, bool lower)

Parameters

path string

Path.

lower bool

Specifies whether path should be lowered inside method.

Returns

string

GetPathFromObjectKey(string, bool)

Returns path from given object key.

public static string GetPathFromObjectKey(string objectKey, bool absolute)

Parameters

objectKey string

Object key.

absolute bool

Indicates whether returned path is absolute

Returns

string

GetPathFromObjectKey(string, bool, bool)

Returns path from given object key.

public static string GetPathFromObjectKey(string objectKey, bool absolute, bool directory)

Parameters

objectKey string

Object key.

absolute bool

Indicates whether returned path is absolute

directory bool

Specifies whether object is directory.

Returns

string

GetPathFromObjectKey(string, bool, bool, bool)

Returns path from given object key.

public static string GetPathFromObjectKey(string objectKey, bool absolute, bool directory, bool lower)

Parameters

objectKey string

Object key.

absolute bool

Indicates whether returned path is absolute

directory bool

Specifies whether object is directory.

lower bool

Specifies whether path should be lowered inside method.

Returns

string

GetRelativePath(string)

Returns relative path from absolute one.

public static string GetRelativePath(string absolute)

Parameters

absolute string

Absolute path to process

Returns

string

GetValidPath(string)

Converts path to valid one and lower the case in the path.

public static string GetValidPath(string path)

Parameters

path string

Path

Returns

string

GetValidPath(string, bool)

Converts path to valid one and optionally lower the case in the path.

public static string GetValidPath(string path, bool lower)

Parameters

path string

Path

lower bool

Specifies whether path should be lowered inside method.

Returns

string