Function xdirs::template_dir_for[][src]

pub fn template_dir_for(app: &str) -> Option<PathBuf>

Returns the path to the user’s template directory for a specific application.

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/{app}/home/alice/Templates
macOS$HOMELibrary/Application Support/{app}/Templates/Users/Alice/Library/Application Support/Chrome/Templates
Windows{FOLDERID_Templates}/{app}C:\Users\Alice\AppData\Roaming\Microsoft\Windows\Templates

See also template_dir.