Raoul Zwart > Lufs-0.21 > Lufs::Stub

Download:
Lufs-0.21.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

Lufs::Stub - A hello-world filesystem for use with perlufs

DESCRIPTION ^

This is an example, demonstrating the API. Unless stated otherwise, methods are expected to return 1 for succes, and 0 for failure.

METHODS ^

init (CONFIG)

CONFIG is a hashref with configuration data, from both lufsd.conf and the -o switch.

mount

This gets called whenever the filesystem is mounted.

umount

This gets called whenever the filesystem is umounted.

stat (FILE, STAT)

STAT is a hash reference. you should fill in the approriate values.

readdir (DIR, LIST)

LIST is an array ref that you should fill. You do not need to push `.' and `..', this will be done for you.

mkdir (DIR, MODE)

MODE is the access mode for the dir that you are creating

open (FILE, MODE)

release (FILE)

read (FILE, OFFSET, COUNT, BUF)

Assign the data to the last argument, return the number of bytes read.

write (FILE, OFFSET, COUNT, BUF)

Return the number of bytes written.

readlink (FILE)

This should return a string: the filename that the link points at.

AUTHOR ^

Raoul Zwart, <rlzwart@cpan.org>

SEE ALSO ^

Lufs::Howto, Lufs

COPYRIGHT AND LICENSE ^

Copyright 2003 by Raoul Zwart

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: