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:
FAKE_ROOT: absolute path to the fake rootFAKE_DIRS: whether or not to intercept directory listing calls tooDEBUG: if set, will debug log to STDERR
License: GPL-3.0-only