Skip to main content

default_root_for

Function default_root_for 

Source
pub fn default_root_for(uid: Uid) -> Utf8PathBuf
Expand description

Returns the per-user base directory used when PG_EMBED_ROOT is unset.

ยงExamples

use nix::unistd::Uid;

let root = pg_embedded_setup_unpriv::default_root_for(Uid::from_raw(1000));
assert_eq!(root.as_str(), "/var/tmp/pg-embed-1000");