Version 3.0.1.0

PathUtilities class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
public static class PathUtilities
Inheritance
  • System.Object
  • PathUtilities

Methods

CanMakeRelative(String, String)
public static bool CanMakeRelative(string absoluteParentPath, string absolutePath)
Parameters
System.String absoluteParentPath

System.String absolutePath

Returns
System.Boolean

Combine(String, String)
public static string Combine(string a, string b)
Parameters
System.String a

System.String b

Returns
System.String

FindParentDirectoryWithName(DirectoryInfo, String)
public static DirectoryInfo FindParentDirectoryWithName(this DirectoryInfo dir, string folderName)
Parameters
System.IO.DirectoryInfo dir

System.String folderName

Returns
System.IO.DirectoryInfo

GetDirectoryName(String)
public static string GetDirectoryName(string x)
Parameters
System.String x

Returns
System.String

HasSubDirectory(DirectoryInfo, DirectoryInfo)
public static bool HasSubDirectory(this DirectoryInfo parentDir, DirectoryInfo subDir)
Parameters
System.IO.DirectoryInfo parentDir

System.IO.DirectoryInfo subDir

Returns
System.Boolean

MakeRelative(String, String)
public static string MakeRelative(string absoluteParentPath, string absolutePath)
Parameters
System.String absoluteParentPath

System.String absolutePath

Returns
System.String

TryMakeRelative(String, String, out String)
public static bool TryMakeRelative(string absoluteParentPath, string absolutePath, out string relativePath)
Parameters
System.String absoluteParentPath

System.String absolutePath

System.String relativePath

Returns
System.Boolean