Mount Tools
- mount_tools.bsh
- 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)
- mount_type
- Arguments:
- $1- Mount name (after running through mount_point)
Returns the mount type of a mount point
See also
Note
Mac/Linux compatible. Works on Windows if you actually have a normal POSIX mount (MING/cygwin).
Bugs
- $1is 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. 
- 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