FilesystemExtensions.CanonicalizePath Method

Takes a string representing a filename and returns a path in a canonical format. A path on a remote share is written in the form \\<server>\<share>\<path>. This element is introduced in Windows PowerShell 5.0.

Namespace: Microsoft.OneGet.Utility.Extensions
Assembly: Microsoft.OneGet.Utility (in Microsoft.OneGet.Utility.dll)

Usage

'Usage
Dim path As String
Dim isPotentiallyRelativePath As Boolean
Dim returnValue As String

returnValue = FilesystemExtensions.CanonicalizePath(path, isPotentiallyRelativePath)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function CanonicalizePath ( _
    path As String, _
    isPotentiallyRelativePath As Boolean _
) As String
[ExtensionAttribute] 
public static string CanonicalizePath (
    string path,
    bool isPotentiallyRelativePath
)
[ExtensionAttribute] 
public:
static String^ CanonicalizePath (
    String^ path, 
    bool isPotentiallyRelativePath
)
/** @attribute ExtensionAttribute() */ 
public static String CanonicalizePath (
    String path, 
    boolean isPotentiallyRelativePath
)
ExtensionAttribute 
public static function CanonicalizePath (
    path : String, 
    isPotentiallyRelativePath : boolean
) : String

Parameters

  • path
  • isPotentiallyRelativePath

Return Value

Returns String.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

FilesystemExtensions Class
FilesystemExtensions Members
Microsoft.OneGet.Utility.Extensions Namespace