Function xdirs::template_dir[][src]

pub fn template_dir() -> Option<PathBuf>

Returns the path to the user’s template directory.

The returned value depends on the operating system and is either a Some, containing a value from the following table, or a None.

PlatformValueExample
Linux$XDG_TEMPLATES_DIR/home/alice/Templates
macOS--
Windows{FOLDERID_Templates}C:\Users\Alice\AppData\Roaming\Microsoft\Windows\Templates

See also template_dir_for.