=========== Mount Tools =========== .. default-domain:: bash .. file:: mount_tools.bsh .. function:: mount_point :Arguments: * ``$1`` - path of file/directory * [``$2``...] - Comma separated list limiting the file system types to process. All other filesystems will be excluded :Output: *stdout* - Mount point containing file/directory :Return Value: * ``0`` - Success * ``1`` - Failed Get the mount point of a path .. note:: Works on Mac/Linux and Windows if you have a df that acts normally (MINGW or cygwin) .. function:: mount_type :Arguments: ``$1`` - Mount name (after running through mount_point) Returns the mount type of a mount point .. seealso:: :func:`mount_point` .. note:: Mac/Linux compatible. Works on Windows if you actually have a normal POSIX mount (MING/cygwin). .. rubric:: Bugs * ``$1`` is actually a regex. So make sure to escape it if it has special characters * Windows 10 comes with a mount command that this will not currently work * Darling does not include a mount command * Special characters such as tab and newline are replaced with ? on linux. .. function:: is_nfs :Arguments: ``$1`` - mount type :Return Value: * ``0`` - Yes * ``1`` - No Checks whether mount type is one of the known nfs names .. note:: Deprecated