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
.
Platform | Value | Example |
---|---|---|
Linux | $XDG_TEMPLATES_DIR /{app} | /home/alice/Templates |
macOS | $HOME Library/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
.