()
| 33 | const controlClient = new StorageControlClient(); |
| 34 | |
| 35 | async function callGetFolder() { |
| 36 | const folderPath = controlClient.folderPath('_', bucketName, folderName); |
| 37 | |
| 38 | // Create the request |
| 39 | const request = { |
| 40 | name: folderPath, |
| 41 | }; |
| 42 | |
| 43 | // Run request |
| 44 | const [response] = await controlClient.getFolder(request); |
| 45 | console.log(`Got folder: ${response.name}.`); |
| 46 | } |
| 47 | |
| 48 | callGetFolder(); |
| 49 | // [END storage_control_get_folder] |