コード例 #1
0
ファイル: RelativeTo.cs プロジェクト: yongaru/fuse-studio
        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);
        }