微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

TiltFs 文件系统

程序名称:TiltFs

授权协议: MIT

操作系统: Linux

开发语言: Ruby

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/

TiltFs 官网

https://github.com/sh19910711/ruby-tilt-fs

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐