2

Is there some existing software to use a virtual filesystem to translate file contents? (read-only or read-write).

It would be interesting to be able to generate a view on a code-base, for example.

  • be able to grep the code without comments (could be useful sometimes, read-only).
  • convert tabs to spaces while editing (trivial, contrived example).
  • translate language syntax (would be non-trivial to do read-write in a reliable way).

Note, translation could be done with any tool which accepts stdin/stdout, but could be a bit more involved too (you may want to know file name extension for example).

4
  • These transformations are all very context sensitive, you'd usually only want them done when using specific applications, not when accessing files generally. So it's likely to be more straightforward for the applications to use libraries to do it than expect the filesystem to handle it for them.
    – Barmar
    Aug 22, 2014 at 19:25
  • @Barmar, sure - you probably wouldn't use this for general purpose access, but you may want a quick view on your files using some translation.
    – ideasman42
    Aug 23, 2014 at 8:48
  • True. It certainly seems possible to implement something like this with FUSE. But the translations have to be bidirectional, so that writing back what you read will produce the same result. Seeking might be tricky, though -- at the very least it will be expensive.
    – Barmar
    Aug 23, 2014 at 8:56
  • @Barmar, it could optionally be a read-only filesystem.
    – ideasman42
    Aug 23, 2014 at 11:11

0

You must log in to answer this question.

Browse other questions tagged .