.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "VFS 3pm" .TH VFS 3pm "2017-07-22" "perl v5.26.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Gnome2::VFS \- Perl interface to the 2.x series of the GNOME VFS library .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Gnome2::VFS; \& \& sub die_already { \& my ($action) = @_; \& die("An error occured while $action.\en"); \& } \& \& die_already("initializing GNOME VFS") unless (Gnome2::VFS \-> init()); \& \& my $source = "http://www.perldoc.com/about.html"; \& my ($result, $handle, $info); \& \& # Open a connection to Perldoc. \& ($result, $handle) = Gnome2::VFS \-> open($source, "read"); \& die_already("opening connection to \*(Aq$source\*(Aq") \& unless ($result eq "ok"); \& \& # Get the file information. \& ($result, $info) = $handle \-> get_file_info("default"); \& die_already("retrieving information about \*(Aq$source\*(Aq") \& unless ($result eq "ok"); \& \& # Read the content. \& my $bytes = $info \-> { size }; \& \& my $bytes_read = 0; \& my $buffer = ""; \& \& do { \& my ($tmp_buffer, $tmp_bytes_read); \& \& ($result, $tmp_bytes_read, $tmp_buffer) = \& $handle \-> read($bytes \- $bytes_read); \& \& $buffer .= $tmp_buffer; \& $bytes_read += $tmp_bytes_read; \& } while ($result eq "ok" and $bytes_read < $bytes); \& \& die_already("reading $bytes bytes from \*(Aq$source\*(Aq") \& unless ($result eq "ok" && $bytes_read == $bytes); \& \& # Close the connection. \& $result = $handle \-> close(); \& die_already("closing connection to \*(Aq$source\*(Aq") \& unless ($result eq "ok"); \& \& # Create and open the target. \& my $target = "/tmp/" . $info \-> { name }; \& my $uri = Gnome2::VFS::URI \-> new($target); \& \& ($result, $handle) = $uri \-> create("write", 1, 0644); \& die_already("creating \*(Aq$target\*(Aq") unless ($result eq "ok"); \& \& # Write to it. \& my $bytes_written; \& \& ($result, $bytes_written) = $handle \-> write($buffer, $bytes); \& die_already("writing $bytes bytes to \*(Aq$target\*(Aq") \& unless ($result eq "ok" && $bytes_written == $bytes); \& \& # Close the target. \& $result = $handle \-> close(); \& die_already("closing \*(Aq$target\*(Aq") unless ($result eq "ok"); \& \& Gnome2::VFS \-> shutdown(); .Ve .SH "ABSTRACT" .IX Header "ABSTRACT" This module allows you to interface with the \s-1GNOME\s0 Virtual File System library. It provides the means to transparently access files on all kinds of filesystems. .SH "DESCRIPTION" .IX Header "DESCRIPTION" Since this module tries to stick very closely to the C \s-1API,\s0 the documentation found at .PP .Vb 1 \& L .Ve .PP is the canonical reference. .PP In addition to that, there's also the automatically generated \s-1API\s0 documentation: Gnome2::VFS::index. .PP The mapping described in Gtk2::api also applies to this module. .PP To discuss this module, ask questions and flame/praise the authors, join gtk\-perl\-list@gnome.org at lists.gnome.org. .SH "KNOWN BUGS" .IX Header "KNOWN BUGS" There are some memory leaks especially with respect to callbacks. This mainly affects GnomeVFSAsync as well as some parts of GnomeVFSXfer and GnomeVFSOps. GnomeVFSMime leaks some list data. .PP GnomeVFSAsync is also known to crash under certain conditions when there are many concurrent transfers. .SH "SEE ALSO" .IX Header "SEE ALSO" Gnome2::VFS::index, Glib, Gtk2, Gtk2::api. .SH "AUTHOR" .IX Header "AUTHOR" Torsten Schoenfeld . .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2003\-2007 by the gtk2\-perl team (see the file \s-1AUTHORS\s0) .PP This library is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. .PP This library is distributed in the hope that it will be useful, but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 Lesser General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, \s-1MA\s0 02111\-1307 \s-1USA\s0