public bool IsSubItemOf(string folderPath) { if (ServerPath.Equals(folderPath)) { return(true); } else { return(Path.Equals(Path.GetDirectoryName(ServerPath), folderPath)); } }