NAME

Linux::MountPoints -- List all mountpints

VERSION

Version 0.01

SYNOPSIS

 use Linux::MountPoint;

 print_out(Linux::MountPoint->root(),'');

 sub print_out
 {
   my $point=shift;
   my $in=shift // '';
   print $in.'Mountpoint: '.$point->mount_point()."\n";
   print $in.'FS Type   : '.$point->fstype()."\n";
   print $in.'Source    : '.$point->source()."\n";
   print $in."--------\n";
   print_out($_,$in.'  ') for(sort{$a->mount_point() cmp $b->mount_point()}$point->childs());
 }

DESCRIPTION

Information about the MountPoints

AUTHOR

ToPeG

PACKAGE VARIABLES

$minfos_file

predefined: /proc/<PID>/mountinfo

METHODS

list()

returns a list of MountPoint-Objects on error it retuns aln empty list.

mount_options()

returns a list of the mount Options

super_options()

returns a list of the super Options

optional_fields()

returns a hash of the optional Fields Options of the Kernelmodul

mount_point()

returns the mountpoint

fstype()

returns the Filesystem Type

device()

returns the Device. If it's a vitual Filesystems it's the name of the kernelmodule.

mount_id()

returns an unique ID

parent_id()

returns the ID of the parent MountPoint

minor()

returns the Kernel minor ID

major()

returns the Kernel major ID

is_virtual()

returns true if the filesystem is virtual

is_bind()

returns true if the Mpuntpoint is moutet with the "bind" option

has_parent()

returns true if the Mountpoint have a parent

source()

returns the real source of the Mountpoint. If it's mounted with "bind" the source is the path to the mount_source. Otherwise i'ts identical to device().

parent()

returns the Parent Mountpoint Object

childs()

returns a list of Child Mountpoint Objects

flatten()

returns a list of all Child Mountpoint Objects

root()

returns the root-filesystem Mountpoint

AUTHOR

Tobias Grönhagen, <linux_mountpoint at topeg.de>

BUGS

Please report any bugs or feature requests to bug-linux-mountpoint at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Linux-MountPoint. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Linux::MountPoint

You can also look for information at:

COPYRIGHT

Copyright 2012 Tobias Grönhagen. All rights reserved.

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License (GPL) version 2 as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

DISCLAIMER

THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Use of this software in any way or in any form, source or binary, is not allowed in any country which prohibits disclaimers of any implied warranties of merchantability or fitness for a particular purpose or any disclaimers of a similar nature.

IN NO EVENT SHALL I BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION (INCLUDING, BUT NOT LIMITED TO, LOST PROFITS) EVEN IF I HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE