示例#1
0
        public static RelativeDirectoryPath RelativeTo(this AbsoluteDirectoryPath destination, AbsoluteDirectoryPath source)
        {
            var commonAncestor = AbsoluteDirectoryPath.FindCommonAncestor(source, destination);

            var sourceToAncestor = source.ToAncestor(commonAncestor);

            var sourceToDestination = sourceToAncestor.ToLeaf(commonAncestor, destination);

            return(sourceToDestination);
        }