예제 #1
0
        public AbsoluteFolderPath GetSiblingFolderPath(string folderName)
        {
            NameHelper.EnsureValidFilenameCharacters(folderName);
            // cant from root, can elsewhere
            if (Parts.Count == 1)
            {
                throw PathExceptions.UndefinedSiblingFor(RootValue);
            }
            var parts = Parts.CloneSublist(Parts.Count - 1);

            parts.Add(folderName);
            return(new AbsoluteFolderPath(parts));
        }