fakeroot
A simple crate which provides the ability to redirect filesystem calls.
This crate builds a library that can be used via LD_PRELOAD.
Some examples follow.
Intercept a file:
FAKE_ROOT="/tmp" LD_PRELOAD="path/to/libfakeroot.so"
# tee hee
Intercept a directory list:
FAKE_ROOT="/tmp" FAKE_DIRS=1 LD_PRELOAD="path/to/libfakeroot.so"
# 🪃
Options are configured via environment variables:
FAKEROOT: absolute path to the fake rootFAKEROOT_DIRS: whether or not to intercept directory listing calls tooFAKEROOT_ALL: whether or not to fake non-existent files and directoriesFAKEROOT_DEBUG: if set, will debug log to STDERR
License: GPL-3.0-only