public static PathName operator/(PathName left, PathName right) { if (left != null) { if (right != null) // left != null && right != null; { return(left.Join(right)); } else // left != null && right == null { return(left); } } else // left == null { if (right != null) // left == null && right != null { return(right); } else // left == null && right == null { return(PathName.Path(null)); } } }
public static IEnumerable <PathName> EnumerateDirectories(this PathName path) { return(Directory.EnumerateDirectories(path.Full).Select(filePath => PathName.Path(filePath))); }