Inheritance: AndXServerMessageBlock
Example #1
0
 /// <exception cref="SharpCifs.Smb.SmbException"></exception>
 internal virtual int Open0(int flags, int access, int attrs, int options)
 {
     int f;
     Connect0();
     if (Log.Level >= 3)
     {
         Log.WriteLine("open0: " + Unc);
     }
     if (Tree.Session.transport.HasCapability(SmbConstants.CapNtSmbs))
     {
         SmbComNtCreateAndXResponse response = new SmbComNtCreateAndXResponse();
         SmbComNtCreateAndX request = new SmbComNtCreateAndX(Unc, flags, access, _shareAccess
             , attrs, options, null);
         if (this is SmbNamedPipe)
         {
             request.Flags0 |= 0x16;
             request.DesiredAccess |= 0x20000;
             response.IsExtended = true;
         }
         Send(request, response);
         f = response.Fid;
         _attributes = response.ExtFileAttributes & AttrGetMask;
         _attrExpiration = Runtime.CurrentTimeMillis() + AttrExpirationPeriod;
         _isExists = true;
     }
     else
     {
         SmbComOpenAndXResponse response = new SmbComOpenAndXResponse();
         Send(new SmbComOpenAndX(Unc, access, flags, null), response);
         f = response.Fid;
     }
     return f;
 }