The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

File::Mountpoint - see if a directory is a mountpoint

SYNOPSIS

    use File::Mountpoint;

    if (File::Mountpoint::is_mountpoint("/foo/bar")) {
        ...
    }

    or

    use File::MountPoint qw( is_mountpoint );

    if (is_mountpoint("/foo/bar")) {
        ...
    }

DESCRIPTION

This module provides a single function, is_mountpoint(), that can be used to tell if a directory path on a POSIX filesystem is the point at which a volume is mounted.

USAGE

Import Parameters

This module accepts symbol names to be exported to it's import method.

    use File::MountPoint qw( is_mountpoint );

Functions

  • is_mountpoint($path)

    Accepts a single scalar parameter which is the path (must be a directory) to be tested.

    This function will die if $path does not exist or is not a directory.

    Returns true on success and fails with undef in scalar context or () in list context.

REFERENCES

mountpoint

This module is based on the behavior of the mountpoint utility that is included with the sysvinit package.

http://freshmeat.net/redir/sysvinit/10192/url_tgz/sysvinit

CREDITS

Miquel van Smoorenburg, miquels@cistron.nl, author of the sysvinit package.

Me, myself, and I.

SUPPORT

Please contact the author directly via e-mail.

AUTHOR

Joshua Hoblitt <jhoblitt@cpan.org>

COPYRIGHT

Copyright (C) 2008 Joshua Hoblitt. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

The full text of the license can be found in the LICENSE file included with this module, or in the perlgpl Pod as supplied with Perl 5.8.1 and later.

SEE ALSO

mountpoint