changed sign
[mirrors/Programs.git] / perl / fuse / fs1.pl
... / ...
CommitLineData
1#!/usr/bin/env perl
2use Fuse::Simple qw(accessor main);
3#use threads;
4#use threads::shared;
5
6my $var = "this is a variable you can modify. write to me!\n";
7my $filesystem = {
8 foo => "this is the contents of a file called foo\n",
9 subdir => {
10 "foo" => "this foo is in a subdir called subdir\n",
11 "blah" => "this blah is in a subdir called subdir\n",
12 },
13 "blah" => \ "subdir/blah", # scalar refs are symlinks
14 recursion => {
15 "recursion" => \ ".", # scalar refs are symlinks
16 },
17 "magic" => sub { return "42\n" }, # will be called to get value
18 "var" => accessor(\$var), # read and write this variable
19 "var2" => accessor(\$var), # and the same variable
20 "var.b" => accessor(\ my $tmp), # and an anonymous var
21};
22main(
23 #"mountpoint" => "./test", # actually optional
24 "debug" => 0, # for debugging Fuse::Simple. optional
25 "fuse_debug" => 0, # for debugging FUSE itself. optional
26 "threaded" => 0, # optional
27 "/" => $filesystem, # required :-)
28);
This page took 0.150574 seconds and 4 git commands to generate.