JFLib

plat/linux_sys.rs (Linux)#

Source: lib/plat/linux_sys.rs

linux_sys -- Linux files, directories, well-known paths   [src/plat/linux/lx_sys.s, plat_linux.s]

No static buffers: every function may run on any thread.  File::read_at / write_at are
pread / pwrite, so several threads may use one File at the same time.
  • fn dev_ino(path: &str) -> Option<(u64, u64)> (st_dev, st_ino) of a path (links followed), None when it cannot be read: the identity fontdb uses to visit a directory once [fd_visit_once]

  • fn config_dir() -> Option<String> $XDG_CONFIG_HOME (absolute), else $HOME/.config; no trailing slash

  • fn data_dir() -> Option<String> $XDG_DATA_HOME (absolute), else $HOME/.local/share; no trailing slash

  • fn cache_dir() -> Option<String> $XDG_CACHE_HOME (absolute), else $HOME/.cache; no trailing slash

  • fn temp_dir() -> Option<String> $TMPDIR (absolute), else /tmp

  • fn cwd() -> String the current directory ("" on failure) [plat_cwd]

Source: docs/API.md in the JFLib repository.