Exemplo n.º 1
0
 /// <exception cref="SharpCifs.Smb.SmbException"></exception>
 /// <exception cref="System.UriFormatException"></exception>
 /// <exception cref="UnknownHostException"></exception>
 internal SmbFileInputStream(SmbFile file, int openFlags)
 {
     this.File       = file;
     this._openFlags = openFlags & 0xFFFF;
     _access         = ((int)(((uint)openFlags) >> 16)) & 0xFFFF;
     if (file.Type != SmbFile.TypeNamedPipe)
     {
         file.Open(openFlags, _access, SmbFile.AttrNormal, 0);
         this._openFlags &= ~(SmbFile.OCreat | SmbFile.OTrunc);
     }
     else
     {
         file.Connect0();
     }
     _readSize = Math.Min(file.Tree.Session.transport.RcvBufSize - 70, file.Tree.Session
                          .transport.Server.MaxBufferSize - 70);
 }