public void Save(string filename)
 {
     if (null != MimeReadStream)
     {
         using (var fs = new FileStream(filename, FileMode.Create, FileAccess.ReadWrite))
         {
             MimeReadStream.CopyTo(fs);
             IsExported = true;
         }
     }
 }
Пример #2
0
        public void Save(string filename)
        {
            if (null == MimeReadStream)
            {
                return;
            }

            var dirName = Path.GetDirectoryName(filename);

            if (dirName != null)
            {
                Directory.CreateDirectory(dirName);
            }

            using (var fs = new FileStream(filename, FileMode.Create, FileAccess.ReadWrite))
            {
                MimeReadStream.CopyTo(fs);
                IsExported = true;
            }
        }