Skip to main content

Class PathUtils

Namespace: Aurigma.DesignAtoms.Common
Assembly: Aurigma.DesignAtoms.dll
Syntax
public static class PathUtils

Inheritance: System.Object -> 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

public static string ExtractFilePath(string root, string absoluteFilePath, char? separatorChar = null)
Parameters
TypeNameDescription
System.Stringroot
System.StringabsoluteFilePath
System.Nullable<System.Char>separatorChar
Returns

System.String

AreFoldersMatch

public static bool AreFoldersMatch(DirectoryInfo folder0, DirectoryInfo folder1)
Parameters
TypeNameDescription
System.IO.DirectoryInfofolder0
System.IO.DirectoryInfofolder1
Returns

System.Boolean

AreFoldersMatch

public static bool AreFoldersMatch(string path0, string path1)
Parameters
TypeNameDescription
System.Stringpath0
System.Stringpath1
Returns

System.Boolean

IsIncludedInRootFolder

public static bool IsIncludedInRootFolder(string selectedFolder, string rootFolder)
Parameters
TypeNameDescription
System.StringselectedFolder
System.StringrootFolder
Returns

System.Boolean

NormalizePath

public static string NormalizePath(string path)
Parameters
TypeNameDescription
System.Stringpath
Returns

System.String

NormalizePath

public static string NormalizePath(string path, char pathSeparatorChar)
Parameters
TypeNameDescription
System.Stringpath
System.CharpathSeparatorChar
Returns

System.String

IsRootFolder

public static bool IsRootFolder(string path)
Parameters
TypeNameDescription
System.Stringpath
Returns

System.Boolean

GetFolder

public static string GetFolder(string path, char separatorChar)
Parameters
TypeNameDescription
System.Stringpath
System.CharseparatorChar
Returns

System.String

GetName

public static string GetName(string path)
Parameters
TypeNameDescription
System.Stringpath
Returns

System.String

ReplaceIllegalChars

public static string ReplaceIllegalChars(string pathPart)
Parameters
TypeNameDescription
System.StringpathPart
Returns

System.String

EnsureFolderExists

public static void EnsureFolderExists(string path)
Parameters
TypeNameDescription
System.Stringpath

CleanFolderName

public static string CleanFolderName(string folderName)
Parameters
TypeNameDescription
System.StringfolderName
Returns

System.String

HasExtension

public static bool HasExtension(string filePath, string extension)
Parameters
TypeNameDescription
System.StringfilePath
System.Stringextension
Returns

System.Boolean

RemoveBasePath

public static string RemoveBasePath(string fullPath, string basePath)
Parameters
TypeNameDescription
System.StringfullPath
System.StringbasePath
Returns

System.String

Was this page helpful?