File::Mountpoint - see if a directory is a mountpoint
use File::Mountpoint; if (File::Mountpoint::is_mountpoint("/foo/bar")) { ... } or use File::MountPoint qw( is_mountpoint ); if (is_mountpoint("/foo/bar")) { ... }
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.
is_mountpoint()
This module accepts symbol names to be exported to it's import method.
import
use File::MountPoint qw( is_mountpoint );
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.
die
$path
Returns true on success and fails with undef in scalar context or () in list context.
undef
()
This module is based on the behavior of the mountpoint utility that is included with the sysvinit package.
mountpoint
http://freshmeat.net/redir/sysvinit/10192/url_tgz/sysvinit
Miquel van Smoorenburg, miquels@cistron.nl, author of the sysvinit package.
sysvinit
Me, myself, and I.
Please contact the author directly via e-mail.
Joshua Hoblitt <jhoblitt@cpan.org>
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.
To install File::Mountpoint, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Mountpoint
CPAN shell
perl -MCPAN -e shell install File::Mountpoint
For more information on module installation, please visit the detailed CPAN module installation guide.