prgramatically mount this filesystem to some mount point
    :param mountpoint:
    :param config:
    :return:
497984
def start_filesystem(mountpoint,
                     config=None):  # pragma: no cover
    
    if has_fuse:
        if not config:
            config = BrainStoreConfig()
        FUSE(BrainStore(config), mountpoint, foreground=True)
    else:
        raise ImportError(err_str)
970987
def linkdir_walk(self):
        '''
        
        '''
        try:
            # Use cached linkdir_walk if we've already run this
            return self._linkdir_walk
        except AttributeError:
            self._linkdir_walk = []
            try:
                parts = self._mountpoint.split('/')
            except AttributeError:
                log.error(
                    '%s class is missing a \'_mountpoint\' attribute',
                    self.__class__.__name__
                )
            else:
                for idx, item in enumerate(parts[:-1]):
                    try:
                        dirs = [parts[idx + 1]]
                    except IndexError:
                        dirs = []
                    self._linkdir_walk.append((
                        salt.utils.path.join(self.linkdir, *parts[:idx + 1]),
                        dirs,
                        []
                    ))
                try:
                    # The linkdir itself goes at the beginning
                    self._linkdir_walk.insert(0, (self.linkdir, [parts[0]], []))
                except IndexError:
                    pass
            return self._linkdir_walk
509145
def RegisterMountPoint(cls, mount_point, path_spec):
    
    if mount_point in cls._mount_points:
      raise KeyError('Mount point: {0:s} already set.'.format(mount_point))

    cls._mount_points[mount_point] = path_spec
510542
def _setup_storage_dir(self):
        
        dir_path = self._settings.get(config.DIRECTORY)
        if dir_path is None:
            dir_path = self._default_path
            if not os.path.exists(dir_path):
                self._make_path(dir_path)
        else:
            dir_path = path.abspath(dir_path)
            if not os.path.exists(dir_path) or not os.path.isdir(dir_path):
                raise exceptions.ConfigurationException(self.__class__.__name__,
                                                        config.DIRECTORY)
        return dir_path.rstrip('/')
460711
def mount_point(cls, file_path):
		
		mount = None

		for mp in cls.mounts():
			mp_path = mp.path()
			if file_path.startswith(mp_path) is True:
				if mount is None or len(mount.path()) <= len(mp_path):
					mount = mp

		return mount
950843
public UnderFileSystemConfiguration createMountSpecificConf(Map<String, String> mountConf) {
    UnderFileSystemConfiguration ufsConf = new UnderFileSystemConfiguration(mProperties.copy());
    ufsConf.mProperties.merge(mountConf, Source.MOUNT_OPTION);
    ufsConf.mReadOnly = mReadOnly;
    ufsConf.mShared = mShared;
    return ufsConf;
  }
60548
def bind_mounts
      ret_val = @launcher.bind_mounts
      ret_val << File.dirname(@config['listen'])
      ret_val += valid_web_paths
      ret_val.uniq
    end
198031
def mount(self, prefix, adapter):
        
        self.adapters[prefix] = adapter
        keys_to_move = [k for k in self.adapters if len(k) < len(prefix)]

        for key in keys_to_move:
            self.adapters[key] = self.adapters.pop(key)
812408
def with_mounts(*args, uchroot_cmd_fn=no_args, **kwargs):
    """"""
    mounts = CFG["container"]["mounts"].value
    prefixes = CFG["container"]["prefixes"].value

    uchroot_opts, mounts = __mounts__("mnt", mounts)
    uchroot_cmd = uchroot_cmd_fn(**kwargs)
    uchroot_cmd = uchroot_cmd[uchroot_opts]
    uchroot_cmd = uchroot_cmd[args]
    paths, libs = env(mounts)
    prefix_paths, prefix_libs = env(prefixes)

    uchroot_cmd = run.with_env_recursive(
        uchroot_cmd,
        LD_LIBRARY_PATH=path.list_to_path(libs + prefix_libs),
        PATH=path.list_to_path(paths + prefix_paths))
    return uchroot_cmd
10856
def mount_volume(volume, device='/dev/xvdf', mountpoint='/mnt/data', fstype='ext4'):
    '''
    
    '''
    _ec2().attach_volume(volume, _host_node()['id'], device)
    time.sleep(1)
    sudo('mkdir -p "%s"' % mountpoint)
    sudo('mount -t "%s" "%s" "%s"' % (fstype, device, mountpoint))
1169708
def mounts():
    '''
    
    '''
    cmd = 'mount'
    ret = {}
    out = __salt__['cmd.run_all'](cmd)

    output = out['stdout'].splitlines()
    for line in output:
        if not line:
            continue
        if 'fuse.mfs' in line:
            comps = line.split(' ')
            info1 = comps[0].split(':')
            info2 = info1[1].split('/')
            ret[comps[2]] = {
                'remote': {
                    'master': info1[0],
                    'port': info2[0],
                    'subfolder': '/' + info2[1],
                },
                'local': comps[2],
                'options': (comps[5].replace('(', '').replace(')', '')
                            .split(',')),
            }
    return ret
749931
def mount(name, device, mkmnt=False, fstype='', opts='defaults', user=None, util='mount'):
    '''
    
    '''
    if util != 'mount':
        # This functionality used to live in img.mount_image
        if util == 'guestfs':
            return __salt__['guestfs.mount'](name, root=device)
        elif util == 'qemu_nbd':
            mnt = __salt__['qemu_nbd.init'](name, device)
            if not mnt:
                return False
            first = next(six.iterkeys(mnt))
            __context__['img.mnt_{0}'.format(first)] = mnt
            return first
        return False

    # Darwin doesn't expect defaults when mounting without other options
    if 'defaults' in opts and __grains__['os'] in ['MacOS', 'Darwin', 'AIX']:
        opts = None

    if isinstance(opts, six.string_types):
        opts = opts.split(',')

    if not os.path.exists(name) and mkmnt:
        __salt__['file.mkdir'](name, user=user)

    args = ''
    if opts is not None:
        lopts = ','.join(opts)
        args = '-o {0}'.format(lopts)

    if fstype:
        # use of fstype on AIX differs from typical Linux use of -t
        # functionality AIX uses -v vfsname, -t fstype mounts all with
        # fstype in /etc/filesystems
        if 'AIX' in __grains__['os']:
            args += ' -v {0}'.format(fstype)
        elif 'solaris' in __grains__['os'].lower():
            args += ' -F {0}'.format(fstype)
        else:
            args += ' -t {0}'.format(fstype)

    cmd = 'mount {0} {1} {2} '.format(args, device, name)
    out = __salt__['cmd.run_all'](cmd, runas=user, python_shell=False)
    if out['retcode']:
        return out['stderr']
    return True
548496
def mount(self, identifier):
        

        driver = self.client.info()['Driver']
        driver_mount_fn = getattr(self, "_mount_" + driver,
                                  self._unsupported_backend)
        cid = driver_mount_fn(identifier)

        # Return mount path so it can be later unmounted by path
        return self.mountpoint, cid
798178
def mounted(cls, unmounted):  # noqa: N802
        
        assert isinstance(unmounted, UnmountedType), ("{} can't mount {}").format(
            cls.__name__, repr(unmounted)
        )

        return cls(
            unmounted.get_type(),
            *unmounted.args,
            _creation_counter=unmounted.creation_counter,
            **unmounted.kwargs
        )
175133
def GetRawDevice(path):
  """"""
  device_map = GetMountpoints()

  path = utils.SmartUnicode(path)
  mount_point = path = utils.NormalizePath(path, "/")

  result = rdf_paths.PathSpec(pathtype=rdf_paths.PathSpec.PathType.OS)

  # Assign the most specific mount point to the result
  while mount_point:
    try:
      result.path, fs_type = device_map[mount_point]
      if fs_type in [
          "ext2", "ext3", "ext4", "vfat", "ntfs", "Apple_HFS", "hfs", "msdos"
      ]:
        # These are read filesystems
        result.pathtype = rdf_paths.PathSpec.PathType.OS
      else:
        result.pathtype = rdf_paths.PathSpec.PathType.UNSET

      # Drop the mount point
      path = utils.NormalizePath(path[len(mount_point):])

      return result, path
    except KeyError:
      mount_point = os.path.dirname(mount_point)
504686
def _mount(device):
    '''
    
    '''
    dest = tempfile.mkdtemp()
    res = __states__['mount.mounted'](dest, device=device, fstype='btrfs',
                                      opts='subvol=/', persist=False)
    if not res['result']:
        log.error('Cannot mount device %s in %s', device, dest)
        _umount(dest)
        return None
    return dest
723164
def p(self, path):
        
        if path.startswith("/"):
            path = path[1:]
        p = os.path.join(self.mount_point, path)
        logger.debug("path = %s", p)
        return p