Пример #1
0
 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));
         }
     }
 }
Пример #2
0
 public static IEnumerable <PathName> EnumerateDirectories(this PathName path)
 {
     return(Directory.EnumerateDirectories(path.Full).Select(filePath => PathName.Path(filePath)));
 }