---
title: "Class PathUtils | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Common/PathUtils/"
---

# Class PathUtils

> **Inheritance:** `System.Object` -> PathUtils

###### **Namespace**: [Aurigma.DesignAtoms.Common](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Common.md)

###### **Assembly**: Aurigma.DesignAtoms.dll

```csharp title="Syntax"
public static class PathUtils
```

## 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`

## Methods

### ExtractFilePath

```csharp
public static string ExtractFilePath(string root, string absoluteFilePath, char? separatorChar = null)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *root* |  |
| `System.String` | *absoluteFilePath* |  |
| `System.Nullable<System.Char>` | *separatorChar* |  |

##### Returns

`System.String`

### AreFoldersMatch

```csharp
public static bool AreFoldersMatch(DirectoryInfo folder0, DirectoryInfo folder1)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.IO.DirectoryInfo` | *folder0* |  |
| `System.IO.DirectoryInfo` | *folder1* |  |

##### Returns

`System.Boolean`

### AreFoldersMatch

```csharp
public static bool AreFoldersMatch(string path0, string path1)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *path0* |  |
| `System.String` | *path1* |  |

##### Returns

`System.Boolean`

### IsIncludedInRootFolder

```csharp
public static bool IsIncludedInRootFolder(string selectedFolder, string rootFolder)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *selectedFolder* |  |
| `System.String` | *rootFolder* |  |

##### Returns

`System.Boolean`

### NormalizePath

```csharp
public static string NormalizePath(string path)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *path* |  |

##### Returns

`System.String`

### NormalizePath

```csharp
public static string NormalizePath(string path, char pathSeparatorChar)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *path* |  |
| `System.Char` | *pathSeparatorChar* |  |

##### Returns

`System.String`

### IsRootFolder

```csharp
public static bool IsRootFolder(string path)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *path* |  |

##### Returns

`System.Boolean`

### GetFolder

```csharp
public static string GetFolder(string path, char separatorChar)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *path* |  |
| `System.Char` | *separatorChar* |  |

##### Returns

`System.String`

### GetName

```csharp
public static string GetName(string path)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *path* |  |

##### Returns

`System.String`

### ReplaceIllegalChars

```csharp
public static string ReplaceIllegalChars(string pathPart)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *pathPart* |  |

##### Returns

`System.String`

### EnsureFolderExists

```csharp
public static void EnsureFolderExists(string path)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *path* |  |

### CleanFolderName

```csharp
public static string CleanFolderName(string folderName)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *folderName* |  |

##### Returns

`System.String`

### HasExtension

```csharp
public static bool HasExtension(string filePath, string extension)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *filePath* |  |
| `System.String` | *extension* |  |

##### Returns

`System.Boolean`

### RemoveBasePath

```csharp
public static string RemoveBasePath(string fullPath, string basePath)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fullPath* |  |
| `System.String` | *basePath* |  |

##### Returns

`System.String`
