Table of Contents

Method IsPathWithinDirectory

Namespace
Oscova.Agents.Utils
Assembly
Oscova.Agents.dll

IsPathWithinDirectory(string, string)

Returns true if fullPath is located inside normalizedDirectoryPath. Uses System.IO.Path.GetRelativePath(System.String,System.String) which is natively case-sensitive on Linux/macOS and case-insensitive on Windows.

public static bool IsPathWithinDirectory(string fullPath, string normalizedDirectoryPath)

Parameters

fullPath string
normalizedDirectoryPath string

Returns

bool