Пример #1
0
 public RemoteDriveItem Localize(IRemoteDriveResolver pathResolver)
 {
     this.FullPath  = pathResolver.Resolve(this.FullPath);
     this.Parent    = Path.GetDirectoryName(this.FullPath);
     this.Localized = true;
     return(this);
 }
Пример #2
0
 public RemoteDriveItem EnsureParents(IRemoteDriveResolver pathResolver)
 {
     foreach (string directory in pathResolver.FullNames(this.Parent))
     {
         if (!Directory.Exists(directory))
         {
             Directory.CreateDirectory(directory);
         }
     }
     return(this);
 }