pub async fn new<P: AsRef<Path>>(path: P) -> Result<Self, tokio::io::Error> {
        let directory = path.as_ref().to_owned();
        if !directory.exists() {
            fs::create_dir_all(&directory).await?;
        }
        Ok(Self { directory })
    }
/// Creates a new file-based vaultr key storage, storing files within
/// `path`. The path provided shouod be a directory. If it doesn't exist, it
/// will be created.
Creates a new file-based vaultr key storage, storing files within
`path`. The path provided shouod be a directory. If it doesn't exist, it
will be created.
Creates a new file - based vaultr key storage storing files within ` path ` . The path provided shouod be a directory . If it doesn ' t exist it will be created .
pub async fn new<P: AsRef<Path>>(path: P) -> Result<Self, tokio::io::Error> {
        let directory = path.as_ref().to_owned();
        if !directory.exists() {
            fs::create_dir_all(&directory).await?;
        }
        Ok(Self { directory })
    }
pub async fn new < P : AsRef < Path > > ( path : P ) -> Result < Self , tokio :: io :: Error > { let directory = path . as_ref ( ) . to_owned ( ) ; if ! directory . exists ( ) { fs :: create_dir_all ( & directory ) . await ? ; } Ok ( Self { directory } ) }
Creates a new file-based vaultr key storage, storing files within
`path`.
Creates a new file - based vaultr key storage storing files within ` path ` .
path
P
path
P