Skip to content

feat(C++): add deleteFolderRecursive sample#16153

Draft
nidhiii-27 wants to merge 3 commits into
mainfrom
feat/add-delete-folder-recursive-sample
Draft

feat(C++): add deleteFolderRecursive sample#16153
nidhiii-27 wants to merge 3 commits into
mainfrom
feat/add-delete-folder-recursive-sample

Conversation

@nidhiii-27

Copy link
Copy Markdown
Contributor

This adds a sample demonstrating how to recursively delete a folder in a hierarchical namespace bucket.

Fixes: b/521168740

This adds a sample demonstrating how to recursively delete a folder in a hierarchical namespace bucket.

Fixes: b/521168740
@nidhiii-27 nidhiii-27 requested review from a team as code owners June 11, 2026 10:55
@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Jun 11, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new sample function DeleteFolderRecursive to demonstrate recursive folder deletion, registers it in the command-line interface, and adds a test case in AutoRun. The reviewer suggested enhancing the test case by creating a nested subfolder structure to properly demonstrate and verify the recursive deletion behavior of the API.

Comment on lines +199 to +200
CreateFolder(client, {bucket_name, folder_id});
DeleteFolderRecursive(client, {bucket_name, folder_id});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To properly test and demonstrate the recursive deletion behavior of DeleteFolderRecursive, it is recommended to create a nested subfolder structure inside the target folder. Otherwise, the test only deletes an empty folder, which does not fully exercise the recursive aspect of the API.

  CreateFolder(client, {bucket_name, folder_id});
  CreateFolder(client, {bucket_name, folder_id + "/subfolder"});
  DeleteFolderRecursive(client, {bucket_name, folder_id});

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@nidhiii-27 nidhiii-27 marked this pull request as draft June 11, 2026 11:00
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.19%. Comparing base (fd73bee) to head (433d4e2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16153      +/-   ##
==========================================
- Coverage   92.20%   92.19%   -0.01%     
==========================================
  Files        2264     2264              
  Lines      208864   208864              
==========================================
- Hits       192579   192567      -12     
- Misses      16285    16297      +12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nidhiii-27 nidhiii-27 added ai-generated storage-sample-architect Generated by storage-sample-architect skill labels Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated samples Issues that are directly related to samples. storage-sample-architect Generated by storage-sample-architect skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant