protected DokanError EraseCard() { try { IChip chip = rfidListener.GetChip(); if (chip == null) { return(DokanError.ErrorNotReady); } IStorageCardService storage = chip.GetService(CardServiceType.CST_STORAGE) as IStorageCardService; if (storage != null) { storage.Erase(); ResetCache(); return(DokanError.ErrorSuccess); } else { return(DokanError.ErrorNotImplemented); } } catch (Exception ex) { log.Error("DeleteDirectory error", ex); rfidListener.ResetCard(); return(DokanError.ErrorError); } }