TiltFs文件系统

联合创作 · 2023-10-01 04:41

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/
浏览 9
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报