Exemplo n.º 1
0
        public DiskStream(Session session, long lun, FileAccess access)
        {
            _session = session;
            _lun     = lun;

            LunCapacity capacity = session.GetCapacity(lun);

            _blockSize = capacity.BlockSize;
            _length    = capacity.LogicalBlockCount * capacity.BlockSize;
            _canWrite  = access != FileAccess.Read;
            _canRead   = access != FileAccess.Write;
        }