MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / callListFolders

Function callListFolders

storage-control/listFolders.js:33–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 const controlClient = new StorageControlClient();
32
33 async function callListFolders() {
34 const bucketPath = controlClient.bucketPath('_', bucketName);
35
36 // Create the request
37 const request = {
38 parent: bucketPath,
39 };
40
41 // Run request
42 const [folders] = await controlClient.listFolders(request);
43 for (const curFolder of folders) {
44 console.log(curFolder.name);
45 }
46 }
47
48 callListFolders();
49 // [END storage_control_list_folders]

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected