Stephane Chmielewski > Linux-Mounts-0.4 > Linux::Mounts

Download:
Linux-Mounts-0.4.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.2   Source   Latest Release: Linux-Mounts-0.5

NAME ^

Linux::Mounts - perl module providing object oriented interface to /proc/mounts

SYNOPSIS ^

use Linux::Mounts;

my $mtd = Linux::Mounts->new(); my $list = $mtd->list_mounts();

print "Number of mounted file systems : ", $mtd->num_mounts(), "\n\n";

print "List of mounted file systems :\n"; for ( my $i = 0; $i < $mtd->num_mounts(); $i++ ) { for ( my $j = 0; $j < $#{ $list }; $j++ ) { printf ("%-15s", $list->[$i][$j]); } print "\n"; }

# or simplier ...

print "\nList of mounted file systems :\n"; $mtd->show_mount();

DESCRIPTION ^

This module provides an interface to the file /proc/mounts. The implementation attempts to resemble to the "mount" linux command.

METHODS

num_mounts

Display the number of mounted file systems.

list_mounts

Provide a double array of the /proc/mounts parameters.

show_mounts

Show all the mounted file systems.

AUTHOR ^

Stephane Chmielewski <snck@free.fr>

COPYRIGHT ^

Copyright (C) 2004 Stephane Chmielewski. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.