Try to locate the iCloud Drive folder.

    Returns:
        (str) Full path to the iCloud Drive folder.
191425
def get_icloud_folder_location():
    
    yosemite_icloud_path = '~/Library/Mobile Documents/com~apple~CloudDocs/'

    icloud_home = os.path.expanduser(yosemite_icloud_path)

    if not os.path.isdir(icloud_home):
        error('Unable to find your iCloud Drive =(')

    return str(icloud_home)
1123637
def get_raw_path(self):
        

        if self.disk_mounter == 'dummy':
            return self.paths[0]
        else:
            if self.disk_mounter == 'avfs' and os.path.isdir(os.path.join(self.mountpoint, 'avfs')):
                logger.debug("AVFS mounted as a directory, will look in directory for (random) file.")
                # there is no support for disks inside disks, so this will fail to work for zips containing
                # E01 files or so.
                searchdirs = (os.path.join(self.mountpoint, 'avfs'), self.mountpoint)
            else:
                searchdirs = (self.mountpoint, )

            raw_path = []
            if self._paths.get('nbd'):
                raw_path.append(self._paths['nbd'])

            for searchdir in searchdirs:
                # avfs: apparently it is not a dir
                for pattern in ['*.dd', '*.iso', '*.raw', '*.dmg', 'ewf1', 'flat', 'avfs']:
                    raw_path.extend(glob.glob(os.path.join(searchdir, pattern)))

            if not raw_path:
                logger.warning("No viable mount file found in {}.".format(searchdirs))
                return None
            return raw_path[0]
539972
def full_path(self):
		
		return self.normalize_path(self.directory_sep().join((self.start_path(), self.session_path())))
785661
def file_path(self) -> str:
        
        user_dir = self.__get_user_path()
        file_path = path.abspath(path.join(user_dir, self.FILENAME))
        return file_path
52433
def dir(self, filetype, **kwargs):
        

        full = kwargs.get('full', None)
        if not full:
            full = self.full(filetype, **kwargs)

        return os.path.dirname(full)
1314396
def get_working_path(self):
        
        self.set_section('Files')
        raw_path = self.option("working_path")
        if raw_path.startswith('~'):
            raw_path = os.path.expanduser('~') + raw_path[1:]

        return raw_path
1076964
def get_vm_full_path(self, si, vm):
        
        folder_name = None
        folder = vm.parent

        if folder:
            folder_name = folder.name
            folder_parent = folder.parent

            while folder_parent and folder_parent.name and folder_parent != si.content.rootFolder and not isinstance(folder_parent, vim.Datacenter):
                folder_name = folder_parent.name + '/' + folder_name
                try:
                    folder_parent = folder_parent.parent
                except Exception:
                    break
            # at this stage we receive a path like this: vm/FOLDER1/FOLDER2;
            # we're not interested in the "vm" part, so we throw that away
            folder_name = '/'.join(folder_name.split('/')[1:])
        # ok, now we're adding the vm name; btw, if there is no folder, that's cool, just return vm.name
        return VMLocation.combine([folder_name, vm.name]) if folder_name else vm.name
623475
def fullPath(self):
        
        for ((dirTree, dirID, dirSeq), (dirPath, name)) in self.links.items():
            try:
                path = self.fileSystem.volumes[dirTree].fullPath
                if path is not None:
                    return path + ("/" if path[-1] != "/" else "") + dirPath + name
            except Exception:
                logging.debug("Haven't imported %d yet", dirTree)

        if self.id == BTRFS_FS_TREE_OBJECTID:
            return "/"
        else:
            return None
1077340
def get_path(self, wd):
        
        watch_ = self._wmd.get(wd)
        if watch_ is not None:
            return watch_.path
1154583
def localDirPath(self):
        
        rootDirPath = os.environ[self.rootDirPathEnvName]
        return os.path.join(rootDirPath, self.contentHash)
740971
def _find_file(filename):
    
    import os
    if os.path.exists(filename):
        path = filename
    else:
        path = os.path.dirname(__file__)
        path = os.path.join(path, 'data', filename)

    if not os.path.exists(path):
        raise ValueError("cannot locate file '%s'" %filename)

    return path
766413
def filepath(self) -> str:
        """"""
        return os.path.join(self._dirpath, self.name + '.nc')
900978
def get_path(self, path=''):
        

        if not path:
            host = self.resource_config.backup_location
            if ':' not in host:
                scheme = self.resource_config.backup_type
                if not scheme or scheme.lower() == self.DEFAULT_FILE_SYSTEM.lower():
                    scheme = self.file_system
                scheme = re.sub('(:|/+).*$', '', scheme, re.DOTALL)
                host = re.sub('^/+', '', host)
                host = '{}://{}'.format(scheme, host)
            path = host

        url = UrlParser.parse_url(path)

        if url[UrlParser.SCHEME].lower() in AUTHORIZATION_REQUIRED_STORAGE:
            if UrlParser.USERNAME not in url or not url[UrlParser.USERNAME]:
                url[UrlParser.USERNAME] = self.resource_config.backup_user
            if UrlParser.PASSWORD not in url or not url[UrlParser.PASSWORD]:
                url[UrlParser.PASSWORD] = self._api.DecryptPassword(self.resource_config.backup_password).Value
        try:
            result = UrlParser.build_url(url)
        except Exception as e:
            self._logger.error('Failed to build url: {}'.format(e))
            raise Exception('ConfigurationOperations', 'Failed to build path url to remote host')
        return result
962434
function() {
                var absPath = _path.resolve(_folderPath);
                if (!_fs.existsSync(absPath)) {
                    return '[DOES NOT EXIST]';
                } else {
                    var stats = _fs.lstatSync(absPath);
                    if (stats.isDirectory()) {
                        return '[DIR]';
                    } else if (stats.isSymbolicLink()) {
                        return '[LINK]';
                    } else {
                        return '[FILE]';
                    }
                }
            }
525565
def getFilepaths(self, filename):
        
        return (os.path.join(os.environ['HOME'], filename),
                os.path.join(self.mackup.mackup_folder, filename))
216496
def full_path(self):
        """"""
        if Path(self.path).is_absolute():
            return self.path
        else:
            return str(self.app_root / self.path)
675064
def getSendPath(self, volume):
        
        try:
            return self._fullPath(next(iter(self.getPaths(volume))))
        except StopIteration:
            return None