The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

OnSearch::VFile - OnSearch virtual file library.

SYNOPSIS

    my $vfile = OnSearch::VFile -> new;
    $return_value = $vfile -> vfopen (<pathname>);
    $mimetype = $vfile -> vf_ftype;
    $return_value = $vfile -> vfseek ($offset, $whence);
    $buf = $vfile -> vfread ($size);
    $vfile -> vfclose;

DESCRIPTION

OnSearch::VFile provides read-only virtual file routines that allow documents of different formats to be indexed and searched. VFile provides an interface to plugin modules which filter the file's contents into plain text, to facilitate indexing and searching.

METHODS

$vf -> new ();

This is the OnSearch::VFile constructor.

$vf -> vfopen (path);

Create a virtual file handle for file path.

$vf -> vf_ftype (path)

Return the MIME type of file path.

$vf -> vfseek (offset, whence);

Seek to file position offset. The whence parameter can be 0 to seek from the beginning of the file, 1, to seek from the current position, and 2 to set the offset from the end of the file.

$vf -> vfread (bytes)

Read bytes from the virtual file.

$vf -> vfclose ();

Close a virtual file handle.

BUGS

The plugin filters don't report errors to WebLog.pm.

SEE ALSO

OnSearch(3)