Skip to main content

ensure_api_token

Function ensure_api_token 

Source
pub fn ensure_api_token(config_dir: &Path) -> Result<String>
Expand description

Ensure the API token file exists, creating one if needed.

Returns the token string. The file is written with restrictive permissions so only the current user can read it.