if (TargetFileInfo.FullName.Contains("\\"))
{
directory = TargetFileInfo.Directory.FullName.Replace("\\", "");
isServerFolder = true;
}
TargetFileInfo.FullName:包含文件名与后缀
TargetFileInfo.Directory.FullName:仅包含完整路径
TargetFileInfo.Directory.Name:仅为最后一级路径名