コード例 #1
0
        /// <summary>
        /// Attempts to find the WfDriveInfo object that the path is rooted on.
        /// </summary>
        private static WfDriveInfo FindMatchingDrive(List <WfDriveInfo> list, string path)
        {
            WfDriveInfo ret = null;

            if (list == null)
            {
                return(ret);
            }
            if (list.Count == 0)
            {
                return(ret);
            }
            var temp = new WfPath(path).FullPath;

            ret = list.FirstOrDefault(i => temp.StartsWith(i.MappedUncPath.ToLower()) || temp.StartsWith(i.LocalName.ToLower()));
            return(ret);
        }
コード例 #2
0
        /// <summary>
        /// Turns the given path into the remotized path on this machine if it can be.
        /// </summary>
        public string RemotizePath(WfPath fullpath)
        {
            var temp = fullpath.FullPath;

            return(temp.Replace(this.LocalName, this.MappedUncPath));
        }