Return local path for a given inode.

    Args:
      inode (int): inode number for the file.
      cache (SQLiteCache): cache.
      database (SQLiteDatabase): database.

    Returns:
      str: full path, including the filename of the given inode value.
502467
def GetLocalPath(self, inode, cache, database):
    
    local_path = cache.GetResults('local_path')
    if not local_path:
      results = database.Query(self.LOCAL_PATH_CACHE_QUERY)

      cache.CacheQueryResults(
          results, 'local_path', 'child_inode_number',
          ('parent_inode_number', 'filename'))
      local_path = cache.GetResults('local_path')

    parent, path = local_path.get(inode, [None, None])

    # TODO: Read the local_sync_root from the sync_config.db and use that
    # for a root value.
    root_value = '%local_sync_root%/'

    if not path:
      return root_value

    paths = []
    while path:
      paths.append(path)
      parent, path = local_path.get(parent, [None, None])

    if not paths:
      return root_value

    # Paths are built top level to root so we need to reverse the list to
    # represent them in the traditional order.
    paths.reverse()
    return root_value + '/'.join(paths)
100304
def cache_local_file(self, path, **kwargs):
        '''
        
        '''
        dest = os.path.join(self.opts['cachedir'], 'localfiles',
                            path.lstrip('/'))
        destdir = os.path.dirname(dest)

        if not os.path.isdir(destdir):
            os.makedirs(destdir)

        shutil.copyfile(path, dest)
        return dest
931086
def dataset_path(cache=None, cachefile="~/.io3d_cache.yaml", get_root=False):
    
    local_data_dir = local_dir

    if cachefile is not None:
        cache = cachef.CacheFile(cachefile)
        # cache.update('local_dataset_dir', head)
    if cache is not None:
        local_data_dir = cache.get_or_save_default("local_dataset_dir", local_dir)

    if get_root:
        local_data_dir
    else:
        logger.warning("Parameter")
        local_data_dir = op.join(local_data_dir, "medical", "orig")

    return op.expanduser(local_data_dir)
1103063
def _get_fullpath(self, filepath):
        
        if filepath[0] == '/':
            return filepath
        return os.path.join(self._base_path, filepath)
737297
def get_db(directory, engine=None):
    
    if engine is None:
        engine = create_engine('sqlite://')
    tables.metadata.create_all(engine)
    Session = sessionmaker(bind=engine)
    db = Session()
    if directory is not None:
        load_from_directory(db, directory)
    return db
1126953
def _get_cache_file_path(self, cache_dir=None):
        
        if cache_dir is None:
            # Tries to get writable cache dir with fallback to users data dir
            # and temp directory
            cache_dir = self._get_writable_cache_dir()
        else:
            if not os.access(cache_dir, os.W_OK):
                raise CacheFileError("None of cache directories is writable.")

        # get directory for cached file
        return os.path.join(cache_dir, self._CACHE_FILE_NAME)
499440
def _get_db(self):
        
        if self._connection:
            try:
                self._connection.close()
            except Exception:
                pass

        return DB(storageFromFile(open(self.conf_path)))
593885
INodeFile getFileINode(String src) {
    byte[][] components = INodeDirectory.getPathComponents(src);
    readLock();
    try {
      INode inode = rootDir.getNode(components);
      if (inode == null || inode.isDirectory())
        return null;
      return (INodeFile)inode;
    } finally {
      readUnlock();
    }
  }
1136418
INode getINode(long id) {
    readLock();
    try {
      INode inode = inodeMap.get(id);
      return inode;
    } finally {
      readUnlock();
    }
  }
1154583
def localDirPath(self):
        
        rootDirPath = os.environ[self.rootDirPathEnvName]
        return os.path.join(rootDirPath, self.contentHash)
500933
def GetRootFileEntry(self):
    
    path_spec = sqlite_blob_path_spec.SQLiteBlobPathSpec(
        table_name=self._path_spec.table_name,
        column_name=self._path_spec.column_name,
        parent=self._path_spec.parent)
    return self.GetFileEntryByPathSpec(path_spec)
681928
public static function GetCacheFilePath ($ini_path, $cache_dir) {
		$round_dir_path	= md5(dirname($ini_path));

		return sprintf(
			'%s/%s/%s/%s_%s',
			$cache_dir,
			substr($round_dir_path, 0, 2),
			substr($round_dir_path, 2, 2),
			$round_dir_path,
			basename($ini_path)
		);
	}
1339829
def file_path(self):
        
        return os.path.join(keyring.util.platform.data_root(), self.filename)
1028904
private void cacheNameInternal(INode inode) {
    // Name is cached only for files
    if (inode.isDirectory()) {
      return;
    }
    ByteArray name = new ByteArray(inode.getLocalNameBytes());
    name = nameCache.put(name);
    if (name != null) {
      inode.setLocalName(name.getBytes());
    }
  }
354033
def path(self):
        '''  '''
        if isinstance(self.dir, Directory):
            return self.dir._path
        elif isinstance(self.dir, ROOT.TDirectory):
            return self.dir.GetPath()
        elif isinstance(self.dir, _FolderView):
            return self.dir.path()
        else:
            return str(self.dir)
306842
def database_path(cls, project, instance, database):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/instances/{instance}/databases/{database}",
            project=project,
            instance=instance,
            database=database,
        )
390657
def get_file_path(game, file, inttype=Integrations.DEFAULT):
    
    base = path()
    for t in inttype.paths:
        possible_path = os.path.join(base, t, game, file)
        if os.path.exists(possible_path):
            return possible_path

    return None