@spacehq/sdk > UserStorage > listDirectory
UserStorage.listDirectory() method
Returns all bucket entries at the specified path.
Signature:
listDirectory(request: ListDirectoryRequest): Promise<ListDirectoryResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
request | ListDirectoryRequest |
Returns:
Promise<ListDirectoryResponse>
Example
const spaceStorage = new UserStorage(spaceUser);
const response = await spaceStorage.listDirectory({ bucket: 'personal', path: ''});
console.log(response.items); // print items in repository