docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PathUtility

    Helper utilities for normalizing and querying file-system paths.

    Inheritance
    object
    PathUtility
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.SimulationPro
    Assembly: Unity.SimulationPro.Capture.dll
    Syntax
    public static class PathUtility

    Methods

    CanonicalPath(string)

    Ensures the path ends with a trailing forward slash.

    Declaration
    public static string CanonicalPath(string path)
    Parameters
    Type Name Description
    string path

    File system path or navigation path.

    Returns
    Type Description
    string

    The path with a trailing / appended if not already present.

    FixPathSeparators(string)

    Replaces all backslash characters in path with forward slashes.

    Declaration
    public static string FixPathSeparators(string path)
    Parameters
    Type Name Description
    string path

    File system path or navigation path.

    Returns
    Type Description
    string

    The path with backslashes replaced by forward slashes.

    GetDirectoryName(string)

    Returns the normalized directory component of the given path, with a trailing slash.

    Declaration
    public static string GetDirectoryName(string path)
    Parameters
    Type Name Description
    string path

    File system path or navigation path.

    Returns
    Type Description
    string

    The directory portion of path with forward-slash separators and a trailing slash.

    GetFileNameWithoutExtension(string)

    Returns the file name without its extension, using normalized forward-slash separators.

    Declaration
    public static string GetFileNameWithoutExtension(string path)
    Parameters
    Type Name Description
    string path

    File system path or navigation path.

    Returns
    Type Description
    string

    The file name without extension.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)