code: func (n *Mounter) GetFileType(pathname string) (mount.FileType, error) {
  	var pathType mount.FileType
  	outputBytes, err := n.ne.Exec("stat", []string{"-L", "--printf=%F", pathname}).CombinedOutput()
  	if err != nil {
  		if strings.Contains(string(outputBytes), "No such file") {
  			err = fmt.Errorf("%s does not exist", pathname)
  		} else {
  			err = fmt.Errorf("stat %s error: %v", pathname, string(outputBytes))
  		}
  		return pathType, err
  	}
  
  	switch string(outputBytes) {
  	case "socket":
  		return mount.FileTypeSocket, nil
  	case "character special file":
  		return mount.FileTypeCharDev, nil
  	case "block special file":
  		return mount.FileTypeBlockDev, nil
  	case "directory":
  		return mount.FileTypeDirectory, nil
  	case "regular file":
  		return mount.FileTypeFile, nil
  	}
  
  	return pathType, fmt.Errorf("only recognise file, directory, socket, block device and character device")
  }
docs: // GetFileType checks for file/directory/socket/block/character devices.