24 |
use Fuse::DBI; |
use Fuse::DBI; |
25 |
Fuse::DBI->mount( ... ); |
Fuse::DBI->mount( ... ); |
26 |
|
|
27 |
See L<run> below for examples how to set parametars. |
See C<run> below for examples how to set parametars. |
28 |
|
|
29 |
=head1 DESCRIPTION |
=head1 DESCRIPTION |
30 |
|
|
31 |
This module will use L<Fuse> module, part of C<FUSE (Filesystem in USErspace)> |
This module will use C<Fuse> module, part of C<FUSE (Filesystem in USErspace)> |
32 |
available at L<http://sourceforge.net/projects/avf> to mount |
available at L<http://sourceforge.net/projects/avf> to mount |
33 |
your database as file system. |
your database as file system. |
34 |
|
|
85 |
|
|
86 |
$ctime_start = time(); |
$ctime_start = time(); |
87 |
|
|
88 |
|
my $pid; |
89 |
if ($arg->{'fork'}) { |
if ($arg->{'fork'}) { |
90 |
my $pid = fork(); |
$pid = fork(); |
91 |
die "fork() failed: $!" unless defined $pid; |
die "fork() failed: $!" unless defined $pid; |
92 |
# child will return to caller |
# child will return to caller |
93 |
if ($pid) { |
if ($pid) { |
94 |
$self ? return $self : return undef; |
return $self; |
95 |
} |
} |
96 |
} |
} |
97 |
|
|
104 |
|
|
105 |
$self->read_filenames; |
$self->read_filenames; |
106 |
|
|
107 |
my $mount = Fuse::main( |
Fuse::main( |
108 |
mountpoint=>$arg->{'mount'}, |
mountpoint=>$arg->{'mount'}, |
109 |
getattr=>\&e_getattr, |
getattr=>\&e_getattr, |
110 |
getdir=>\&e_getdir, |
getdir=>\&e_getdir, |
118 |
debug=>0, |
debug=>0, |
119 |
); |
); |
120 |
|
|
121 |
if (! $mount) { |
exit(0) if ($arg->{'fork'}); |
122 |
warn "mount on ",$arg->{'mount'}," failed!\n"; |
|
123 |
return undef; |
return 1; |
124 |
} |
|
125 |
}; |
}; |
126 |
|
|
127 |
=head2 umount |
=head2 umount |