System.IO.File.Decrypt C# (CSharp) Méthode

Decrypt() public static méthode

public static Decrypt ( String path ) : void
path String
Résultat void
        public static void Decrypt(String path)
        {
            if (path == null)
                throw new ArgumentNullException(nameof(path));

            // TODO: Not supported on Unix or in WinRt, and the EncryptFile API isn't currently
            // available in OneCore.  For now, we just throw PNSE everywhere.  When the API is
            // available, we can put this into the FileSystem abstraction and implement it
            // properly for Win32.

            throw new PlatformNotSupportedException();
        }
    }

Same methods

File::Decrypt ( string path ) : void

Usage Example

        /// <summary>
        /// Дешифровка файла.
        /// </summary>
        public void uncoder()
        {
            stream.Close();                                //закрываем поток
            if (SFile.Exists(fname) & fname.Length <= 260) //проверка на существование файла и корректность имени
            {
                try
                {
                    SFile.Decrypt(fname);//дешифруем файл
                }

                catch (Exception ex)                                    //обработка исключений для дешифрования
                {
                    LogForOperations("Дешифрование файла", ex.Message); //запись в лог ошибки (если есть)
                    throw ex;
                }
            }
        }
All Usage Examples Of System.IO.File::Decrypt