@textile/hub > Buckets > pullPathAccessRoles
Buckets.pullPathAccessRoles() method
List the access roles per path in a Bucket
Signature:
pullPathAccessRoles(key: string, path?: string): Promise<Map<string, 0 | 1 | 2 | 3>>;
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Unique (IPNS compatible) identifier key for a bucket. |
path | string | A relative path within a bucket. |
Returns:
Promise<Map<string, 0 | 1 | 2 | 3>>
Example
import { Buckets } from '@textile/hub'
const viewRoot = async (buckets: Buckets, key: string) => {
const list = buckets.pullPathAccessRoles(key, '/')
console.log(list)
}