package Glib::IO;
$Glib::IO::VERSION = '0.001';
=encoding utf8

=head1 NAME

Glib::IO - Perl bindings to the GIO library


  use Glib;
  use Glib::IO;

  # Synchronous I/O
  $cur_dir = Glib::IO::File::new_for_path('.');
  $enumerator = $cur_dir->enumerate_children('standard::*', [], undef);
  $file_info = $enumerator->next_file(undef);
  while ($next_file) {
      say 'Path: ' + $file_info->get_name();

  # Asynchronous I/O
  $loop = Glib::MainLoop->new();
  $file = Glib::IO::File::new_for_path('/etc/passwd');
  $file->query_info_async('access::can-read,access::can-write', [], 0, sub {
      my ($file, $res, $data) = @_;
      my $info = $file->query_info_finish();
      say 'Can read:  ' + $info->get_attribute_boolean('access::can-read');
      say 'Can write: ' + $info->get_attribute_boolean('access::can-write');

  # Platform API
  $network_monitor = Glib::IO::NetworkMonitor::get_default();
  say 'Connected: ', $network_monitor->get_network_available() ? 'Yes' : 'No';


Perl bindings to the GIO library. This modules allows you to write portable
code to perform synchronous and asynchronous I/O; implement IPC clients and
servers using the DBus specification; interact with the operating system and
platform using various services.


The C<Glib::IO> module allows a Perl developer to access the GIO library, the
high level I/O and platform library of the GNOME development platform. GIO is
used for:


=item * local and remote enumeration and access of files

GIO has multiple backends to access local file systems; SMB/CIFS volumes;
WebDAV resources; compressed archives; local devices and remote web services.

=item * stream based I/O

Including files, memory buffers, and network streams.

=item * low level and high level network operations

Sockets, Internet addresses, datagram-based connections, and TCP connections.

=item * TLS/SSL support for socket connections

=item * DNS resolution and proxy

=item * low level and high level DBus classes

GIO allows the implementation of clients and servers, as well as proxying
objects over DBus connections.


Additionally, GIO has a collection of high level classes for writing
applications that integrate with the platform, like:


=item settings

=item network monitoring

=item a base Application class

=item extensible data models

=item content type matching

=item application information and launch


For more information, please visit the GIO reference manual available on
L<>. The Perl API closely matches the
C one, and eventual deviations will be documented here.

The principles underlying the mapping from C to Perl are explained in the
documentation of L<Glib::Object::Introspection>, on which C<Glib::IO> is based.

L<Glib::Object::Introspection> also comes with the C<perli11ndoc> program which
displays the API reference documentation of all installed libraries organized
in accordance with these principles.


use strict;
use warnings;
use Glib::Object::Introspection;

my $GIO_BASENAME = 'Gio';
my $GIO_VERSION = '2.0';
my $GIO_PACKAGE = 'Glib::IO';

sub import {
    basename => $GIO_BASENAME,
    version => $GIO_VERSION,
    package => $GIO_PACKAGE);

#=head2 Customizations and overrides


=head1 SEE ALSO


=item * To discuss Glib::IO and ask questions join at

=item * Also have a look at the gtk2-perl website and sourceforge project page,

=item * L<Glib>

=item * L<Glib::Object::Introspection>

=item * L<Gtk3>


=head1 AUTHORS


=item Torsten Schönfeld <>

=item Emmanuele Bassi <>



Copyright (C) 2010-2015 by Torsten Schönfeld <>
Copyright 2017  Emmanuele Bassi

This library is free software; you can redistribute it and/or modify it under
the terms of the Lesser General Public License (LGPL).  For more information,