public static boolean isMountingPoint ( String path , String [ ] fsTypes ) throws IOException { List < UnixMountInfo > infoList = ShellUtils . getUnixMountInfo ( ) ; for ( UnixMountInfo info : infoList ) { Optional < String > mountPoint = info . getMountPoint ( ) ; Optional < String > fsType = info . getFsType ( ) ; if ( mountPoint . isPresent ( ) && mountPoint . get ( ) . equals ( path ) && fsType . isPresent ( ) ) { for ( String expectedType : fsTypes ) { if ( fsType . get ( ) . equalsIgnoreCase ( expectedType ) ) { return true ; } } } } return false ; }
Checks whether a path is the mounting point of a RAM disk volume .