// Special HasParentDirectory impl for VariablePaths internal static bool HasParentDirectory(string path) { Debug.Assert(path != null); if (!MiscHelpers.HasParentDirectory(path)) { return(false); } var lastName = MiscHelpers.GetLastName(path); // Here, we ensure that there is no variable defined into the last fileName or directoryName! return(!DoesFileNameContainVariable(lastName)); }