private void SetupFilesystem()
        {
            Debug.WriteLine("SetupFilesystem");

            _filesystem = new DokanOneDrive(Letter, Name);
            //Debug.WriteLine("Connecting...");
            //_filesystem.Connect();
        }
        public void Dispose()
        {
            Debug.WriteLine("Dispose");


            if (_threadCancel != null)
            {
                _threadCancel.Cancel();
            }
            if (_pauseEvent != null)
            {
                _pauseEvent.Set();
            }
            try
            {
                Dokan.RemoveMountPoint(String.Format("{0}:\\", Letter));
                if (_filesystem != null)
                {
                    //filesystem.Dispose();


                    _filesystem = null;
                }
            }
            catch
            {
                Status = DriveStatus.Unmounted;
            }
            finally
            {
                _filesystem = null;
            }


            if (_mountCancel != null)
            {
                _mountCancel.Dispose();
            }
            if (_threadCancel != null)
            {
                _threadCancel.Dispose();
            }
            if (_pauseEvent != null)
            {
                _pauseEvent.Dispose();
            }
        }
        public void Unmount()
        {
            Debug.WriteLine("Unmount");

            Status = DriveStatus.Unmounting;
            try
            {
                // Dokan.Unmount(Letter);
                Dokan.RemoveMountPoint(String.Format("{0}:\\", Letter));
                if (_filesystem != null)
                {
                    //_filesystem.Dispose();
                }
            }
            catch
            {
                Status = DriveStatus.Unmounted;
                OnStatusChanged(EventArgs.Empty);
            }
            finally
            {
                _filesystem = null;
            }
        }