Find a file
saces 7b95bb2113 resolve symlinks inside the tree, hide the rest
Symlinks are no longer passed through as symlinks. A symlink whose
target resolves to a path inside the source tree is presented as its
target (regular file or directory). Symlinks pointing outside the tree,
dangling or cyclic links, links to hidden targets, and other
non-regular files are hidden.
2026-09-17 21:42:23 +02:00
goutensil add missing library header 2023-12-10 18:56:31 +01:00
internal resolve symlinks inside the tree, hide the rest 2026-09-17 21:42:23 +02:00
.gitignore Initial commit 2023-01-01 19:25:23 +01:00
config.go Initial commit 2023-01-01 19:25:23 +01:00
go.mod go mod update 2026-09-17 21:16:36 +02:00
go.sum go mod update 2026-09-17 21:16:36 +02:00
main.go rewrite/refactor bazil.org/fuse -> github.com/hanwen/go-fuse, add some tests 2026-07-30 14:56:09 +02:00
README.adoc resolve symlinks inside the tree, hide the rest 2026-09-17 21:42:23 +02:00

## hidefs

Simple bind mount, but hides some files.

A fuse filesystem written in go

---

If the projects use different vcs or different tooling sharing code beetween projects or local overwrite dependencies can be <censored>. +
Local overrides can be committed, git submodules are error prone if you are not aware of them, and so on.

I just want a proper plan9'ish file system view… +
So I need a filtering bind mount, didn't find one I wanted to use and created this project.

Its a bind mount that can hide files like you configured it, f.e. `.git` directories or `go.mod` files.

Symlinks are resolved: if the target lies inside the source tree, the symlink is shown as its target (a regular file or directory). Symlinks pointing outside the source tree, dangling symlinks, and other non-regular files are automatically hidden.

---

Install:
----
go install https://gitlab.com/mb-saces/hidefs
----

From Source:
----
mkdir hidefs
cd hidefs
git clone https://gitlab.com/mb-saces/hidefs .
go build .
----

Usage:
----
hidefs configfile.yaml
----

Unmount all mounts:
----
hidefs -u configfile.yaml
----

example config:
[source,yaml]
----
HideFSConfig:
  - Name: OptionalNameForDebuggingPurposes
    HideNames:
      - name1
      - name2
    SourceDir: /path/to/source/dir
    TargetDirs:
      - /path/to/target/dir
  - Name: AnOtherOptionalNameForDebuggingPurposes
    HideNames:
      - name1
      - name2
    SourceDir: /path/to/source/dir2
    TargetDirs:
      - /path/to/target/dir1
      - /path/to/target/dir2
----

example systemd service unit:
[source]
----
[Unit]
Description=Hidefs File Hiding Service

[Service]
Type=simple
ExecStart=/path/to/hidefs /path/to/config.yaml
ExecStop=/path/to/hidefs -u /path/to/config.yaml

[Install]
WantedBy=default.target
----