TiltFs文件系统
TiltFs 是一个基于 Tilt 的用户空间下的文件系统。
使用方法:
1. 安装文件系统
$ cd {some_dir} $ mkdir _template $ mkdir mnt $ echo 'Hello, <%= name %>' > _template/hello.txt $ tiltfs mnt/ _template/ -> Mount "_template" into "mnt"
2. 访问文件
$ cd {some_dir} $ cat mnt/hello.txt Hello, <%= name %>$ $ mv _template/hello.txt _template/hello.txt.erb $ ruby -r yaml -e 'puts({name: "world"}.to_yaml)' > .data.yaml - you can pass the data through ".data.yaml"$ cat mnt/hello.txt Hello, world $ $ ruby -r yaml -e 'puts({name: "NEW WORLD"}.to_yaml)' > .data.yaml $ cat mnt/hello.txt Hello, NEW WORLD
3. 卸载文件系统
$ cd {some_dir} $ fusermount -u mnt/
评论