SevenZip/StreamWrappers.cs
/// <summary>
///   Cleans up any resources used and fixes file attributes.
/// </summary>
Cleans up any resources used and fixes file attributes.
Cleans up any resources used and fixes file attributes .
public void Dispose()
        {
            if (_baseStream != null && DisposeStream)
            {
                try
                {
                    _baseStream.Dispose();
                }
                catch (ObjectDisposedException)
                {
                }
                _baseStream = null;
            }
            if (!String.IsNullOrEmpty(_fileName) && File.Exists(_fileName))
            {
                try
                {
#if !WINCE
                    File.SetLastWriteTime(_fileName, _fileTime);
                    File.SetLastAccessTime(_fileName, _fileTime);
                    File.SetCreationTime(_fileName, _fileTime);
#elif WINCE
                    OpenNETCF.IO.FileHelper.SetLastWriteTime(_fileName, _fileTime);
                    OpenNETCF.IO.FileHelper.SetLastAccessTime(_fileName, _fileTime);
                    OpenNETCF.IO.FileHelper.SetCreationTime(_fileName, _fileTime);
#endif
                }
                catch (ArgumentOutOfRangeException)
                {
                }
            }
            GC.SuppressFinalize(this);
        }
public void Dispose ( ) { if ( _baseStream != null && DisposeStream ) { try { _baseStream . Dispose ( ) ; } catch ( ObjectDisposedException ) { } _baseStream = null ; } if ( ! String . IsNullOrEmpty ( _fileName ) && File . Exists ( _fileName ) ) { try { if ! WINCE File . SetLastWriteTime ( _fileName , _fileTime ) ; File . SetLastAccessTime ( _fileName , _fileTime ) ; File . SetCreationTime ( _fileName , _fileTime ) ; elif WINCE OpenNETCF . IO . FileHelper . SetLastWriteTime ( _fileName , _fileTime ) ; OpenNETCF . IO . FileHelper . SetLastAccessTime ( _fileName , _fileTime ) ; OpenNETCF . IO . FileHelper . SetCreationTime ( _fileName , _fileTime ) ; endif } catch ( ArgumentOutOfRangeException ) { } } GC . SuppressFinalize ( this ) ; }
Cleans up any resources used and fixes file attributes.
Cleans up any resources used and fixes file attributes .
//TODO: time support for Windows Phone