cloudflare-ddns-service/src/file.rs
2019-09-22 22:27:28 +02:00

13 lines
299 B
Rust

use failure::Error;
use quicli::fs::{write_to_file, read_file};
use std::path::PathBuf;
pub fn read_cache_file(path: &PathBuf) -> Result<String, Error> {
Ok(read_file(path)?)
}
pub fn write_cache_file(path: &PathBuf, ip: &str) -> Result<(), Error> {
write_to_file(path, ip)?;
Ok(())
}