Skip to main content

write_session

Function write_session 

Source
pub fn write_session(data: &SessionData) -> Result<(), SessionError>
Expand description

Write session data to the session file. Creates ~/.chrome-cli/ if needed.

Uses atomic write (write to temp file then rename) and sets file permissions to 0o600 on Unix.

ยงErrors

Returns SessionError::Io on I/O failure or SessionError::NoHomeDir if the home directory cannot be determined.