ResolveDfs() private method

private ResolveDfs ( ServerMessageBlock request ) : void
request ServerMessageBlock
return void
Example #1
0
 /// <summary>
 /// Changes the name of the file this <code>SmbFile</code> represents to the name
 /// designated by the <code>SmbFile</code> argument.
 /// </summary>
 /// <remarks>
 /// Changes the name of the file this <code>SmbFile</code> represents to the name
 /// designated by the <code>SmbFile</code> argument.
 /// <p/>
 /// <i>Remember: <code>SmbFile</code>s are immutible and therefore
 /// the path associated with this <code>SmbFile</code> object will not
 /// change). To access the renamed file it is necessary to construct a
 /// new <tt>SmbFile</tt></i>.
 /// </remarks>
 /// <param name="dest">An <code>SmbFile</code> that represents the new pathname</param>
 /// <exception cref="System.ArgumentNullException">If the <code>dest</code> argument is <code>null</code>
 /// 	</exception>
 /// <exception cref="SharpCifs.Smb.SmbException"></exception>
 public virtual void RenameTo(SmbFile dest)
 {
     if (GetUncPath0().Length == 1 || dest.GetUncPath0().Length == 1)
     {
         throw new SmbException("Invalid operation for workgroups, servers, or shares");
     }
     ResolveDfs(null);
     dest.ResolveDfs(null);
     if (!Tree.Equals(dest.Tree))
     {
         throw new SmbException("Invalid operation for workgroups, servers, or shares");
     }
     if (Log.Level >= 3)
     {
         Log.WriteLine("renameTo: " + Unc + " -> " + dest.Unc);
     }
     _attrExpiration = _sizeExpiration = 0;
     dest._attrExpiration = 0;
     Send(new SmbComRename(Unc, dest.Unc), Blank_resp());
 }