public static ShareInfo GetShareInfoForLocalPath(string fileName)
{
if (String.IsNullOrEmpty(fileName))
{
return null;
}
fileName = Path.GetFullPath(fileName);
if (!IsValidLocalFilePath(fileName))
{
return null;
}
List<ShareInfo> shareInfoList = GetShareInfo();
if (shareInfoList != null)
{
return FindBestShareInfoMatch(shareInfoList, fileName);
}
return null;
}