~ K    A     L    I ~
UNAME : Linux web63.extendcp.co.uk 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
SERVER IP : 10.0.187.63 -________- CLIENT IP : 216.73.216.230
PATH :/usr/share/perl5/vendor_perl/File/
UP FILE :
MINI SHELL D ZAB '
Current File : //usr/share/perl5/vendor_perl/File/Mountpoint.pm
package File::Mountpoint;

use strict;

our $VERSION = '1.0';

use base qw( Exporter );

use Carp;
use File::stat qw( :FIELDS );
use Fcntl qw( :mode );
use File::Spec;

our @EXPORT_OK = qw( is_mountpoint );

sub is_mountpoint {

    my $path = shift;
    return unless defined $path;

    # run lstat() on the path
    my $ls = lstat($path);

    # check to see if the path exists
    unless (defined $ls) {
        croak "is_mountpoint: $path: No such file or directory";
    }

    # check to make sure that the path exists and is a directory
    unless (S_ISDIR($st_mode)) {
        croak "is_mountpoint: $path: not a directory";
    }

    # store the lstat() device and inode
    my $ls_dev = $st_dev;
    my $ls_ino = $st_ino;

    # append /.. to the path and run stat() on it
    stat(File::Spec->catdir($path, "/.."));

    # store the stat() device
    my $s_dev = $st_dev;
    my $s_ino = $st_ino;

    # compare the lstat() and stat() devs
    # based directly on code from mountpoint.c
    unless (($ls_dev != $s_dev) || ($ls_dev == $s_dev && $ls_ino == $s_ino)) {
        return;
    }

    return 1;
}

1;
Coded by KALI :v Greetz to DR HARD ../ kali.zbi@hotmail.com