/[fuse.before_github]/perl-llin/examples/filter_attr_fs.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Log of /perl-llin/examples/filter_attr_fs.pl

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 117 - (view) (annotate) - [select for diffs]
Modified Mon Jan 7 11:45:54 2008 UTC (13 years, 9 months ago) by dpavlin
File length: 6441 byte(s)
Diff to previous 116
update from Reuben Thomas: fixes a bug in mkdir (failed to tag, so newly
created dir was not visible in the filtered fs), and makes error reporting a
little better (if tag routine returns an error, that is propagated).        

Revision 116 - (view) (annotate) - [select for diffs]
Added Thu Dec 6 10:58:07 2007 UTC (13 years, 10 months ago) by dpavlin
File length: 6378 byte(s)
Added contributed filesystem described in e-mail message below:

From: Reuben Thomas <rrt@sc3d.org>
To: dpavlin@rot13.org
Subject: Contribution of sample FS to Fuse

Hi,

I'm just putting the finishing touches to an FS I wrote with Fuse, which
was invaluable, as I couldn't contemplate writing it in C (it's just not
important enough for that much pain!).

I've called it filter_attr_t.pl. It is just loopback_t.pl, augmented with a
function and a little logic so that only files that possess extended
attribute given at mount time are visible. Further, if you try to write to
a file that exists but is not tagged (and hence invisible), you get
-EEXIST, and if you try to unlink a tagged file, it is merely untagged
rather than actually unlinked.

My use for this is to use the backup program Unison, which synchronises two
directory trees, to synch my PDA and my home directory, while excluding
most of the files in my home dir (which would simply not fit in my PDA's
16Mb of file space!). I was amazed to find I couldn't see a FUSE fs which
would do this already, and I was nearly in despair when I remembered Fuse,
and, sure enough, it looked a lot easier than writing a FUSE fs in C.

Of course, the example code was also invaluable, as without it I would have
taken much longer to write the code, and I wouldn't have known some of the
traps.

So, a big thank you, and I attach the current version.

--
http://rrt.sc3d.org/ | Slow Pedestrian Crossing (Anon)

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.26