Class PathUtility
A utility class for executing path-related operations.
Namespace: Unity.AnimeToolbox
Syntax
public static class PathUtility
Methods
GetDirectoryName(String, Int32)
Get the directory name of the path n-levels up Ex: n=1. Assets/Scripts/Foo.cs => Assets/Scripts n=2. Assets/Scripts/Foo.cs => Assets
Declaration
public static string GetDirectoryName(string path, int n = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | the base path |
| Int32 | n | how many levels up |
Returns
| Type | Description |
|---|---|
| String | the directory name |