toddi 0.3.2

A TODO focuser built on top of todo.txt
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use anyhow::{Context, Result};

pub fn get_file_content(file_path: &std::path::Path) -> Result<String> {
    std::fs::read_to_string(file_path)
        .with_context(|| format!("could not read file `{}`", file_path.display()))
}

pub fn write_to_file(
    source_location: String,
    new_file: String,
) -> std::result::Result<(), anyhow::Error> {
    std::fs::write(&source_location, new_file)
        .with_context(|| format!("could not write to file `{}`", source_location))
}