Skip to main content

create

Function create 

Source
pub fn create(
    root: &Path,
    folder: &str,
    name: &str,
    text: &str,
) -> Result<String, String>
Expand description

A new note in folder, its file named after name (free_path), holding text; the free name found and taken under the notes’ lock (with_lock): two writers making “Plan” at once make “Plan.md” and “Plan 2.md”, and neither is written over. Returns its path in the notes.