pub fn create(path: &Path, password: &str) -> VResult<()> {
    if path.exists() {
        Err(Error::from(io::Error::new(
            io::ErrorKind::AlreadyExists,
            "Vault already exists",
        )))
    } else {
        write(path, password, Book::new())
    }
}
/// Creates a new, empty vault to given path
Creates a new, empty vault to given path
Creates a new empty vault to given path
pub fn create(path: &Path, password: &str) -> VResult<()> {
    if path.exists() {
        Err(Error::from(io::Error::new(
            io::ErrorKind::AlreadyExists,
            "Vault already exists",
        )))
    } else {
        write(path, password, Book::new())
    }
}
pub fn create ( path : & Path , password : & str ) -> VResult < ( ) > { if path . exists ( ) { Err ( Error :: from ( io :: Error :: new ( io :: ErrorKind :: AlreadyExists , " " , ) ) ) } else { write ( path , password , Book :: new ( ) ) } }
Creates a new, empty vault to given path
Creates a new empty vault to given path
path
&Path
password
&str
path
&Path
password
&str