///
/// Deletes the SQLite database file with the provided id from the path specified in the
/// config file.
///
/// # Arguments
///
///  * `id` - id of the SQLite DB file
///  * `storage_config` - config containing the location of SQLite DB files
///  * `storage_credentials` - DB credentials
///
/// # Returns
///
/// Result that can be either:
///
///  * `()`
///  * `IndyError`
///
/// # Errors
///
/// Any of the following `IndyError` type_ of errors can be throw by this method:
///
///  * `IndyError::NotFound` - File with the provided id not found
///  * `IOError(..)` - Deletion of the file form the file-system failed
///
Deletes the SQLite database file with the provided id from the path specified in the
config file.
Deletes the SQLite database file with the provided id from the path specified in the config file .
fn delete_storage(&self, id: &str, config: Option<&str>, _credentials: Option<&str>) -> IndyResult<()> {
        let config = config
            .map(serde_json::from_str::<Config>)
            .map_or(Ok(None), |v| v.map(Some))
            .to_indy(IndyErrorKind::InvalidStructure, "Malformed config json")?;
        let db_file_path = SQLiteStorageType::_db_path(id, config.as_ref());
        if !db_file_path.exists() {
            return Err(err_msg(IndyErrorKind::WalletNotFound, format!("Wallet storage file isn't found: {:?}", db_file_path)));
        }
        std::fs::remove_dir_all(db_file_path.parent().unwrap())?;
        Ok(())
    }
fn delete_storage ( & self , id : & str , config : Option < & str > , _credentials : Option < & str > ) -> IndyResult < ( ) > { let config = config . map ( serde_json :: from_str :: < Config > ) . map_or ( Ok ( None ) , | v | v . map ( Some ) ) . to_indy ( IndyErrorKind :: InvalidStructure , " " ) ? ; let db_file_path = SQLiteStorageType :: _db_path ( id , config . as_ref ( ) ) ; if ! db_file_path . exists ( ) { return Err ( err_msg ( IndyErrorKind :: WalletNotFound , format ! ( " " db_file_path ) ) ) ; } std :: fs :: remove_dir_all ( db_file_path . parent ( ) . unwrap ( ) ) ? ; Ok ( ( ) ) }
Deletes the SQLite database file with the provided id from the path specified in the
config file.
Deletes the SQLite database file with the provided id from the path specified in the config file .
Result that can be either.


Result that can be either .
&self
id
&str
config
Option<&str>
_credentials
Option<&str>
errors
Any of the following `IndyError` type_ of errors can be throw by this method.

`IndyError::NotFound` - File with the provided id not found
`IOError(..)` - Deletion of the file form the file-system failed
Any of the following ` IndyError ` type_ of errors can be throw by this method . ` IndyError :: NotFound ` - File with the provided id not found ` IOError ( .. ) ` - Deletion of the file form the file - system failed