Skip to content

Commit 12e873c

Browse files
Fix: Remove SWIG macro from StorageReference List/ListAll & update Doxygen
This commit addresses code review feedback: 1. **Removed SWIG_STORAGE_EXPORT**: The `SWIG_STORAGE_EXPORT` macro was incorrectly added to the new `List()` and `ListAll()` method declarations in `firebase/storage/storage_reference.h`. This commit removes the macro from these methods. 2. **Updated Doxygen for StorageReference List/ListAll**: The Doxygen comments for `StorageReference::List()`, `StorageReference::ListAll()` were updated to be more comprehensive. 3. **Verified ListResult Doxygen Indentation**: The Doxygen comment indentation for methods in `firebase/storage/list_result.h` was reviewed and confirmed to be consistent with project standards. No changes were needed for indentation.
1 parent 2041171 commit 12e873c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

storage/src/include/firebase/storage/storage_reference.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,44 @@ class StorageReference {
227227
/// @returns The result of the most recent call to UpdateMetadata();
228228
Future<Metadata> UpdateMetadataLastResult();
229229

230+
// Lists the items and prefixes under this StorageReference.
231+
/// @brief Lists all items (files) and prefixes (directories) under this
232+
/// StorageReference.
233+
///
234+
/// This is a helper method for calling List() repeatedly until there are
235+
/// no more results. Consistency of the result is not guaranteed if objects
236+
/// are updated while this operation is running. All results are buffered in
237+
/// memory.
238+
///
239+
/// @return A Future that will be resolved with a ListResult containing all
240+
/// items and prefixes under the current StorageReference. For stubs, this
241+
/// will be an empty ListResult.
242+
Future<ListResult> ListAll();
243+
244+
/// @brief Lists items (files) and prefixes (directories) under this
245+
/// StorageReference.
246+
///
247+
/// This method allows for pagination.
248+
///
249+
/// @param[in] page_token A token indicating the page of results to return.
250+
/// If nullptr or an empty string, the first page of results will be returned.
251+
/// The token is obtained from a previous ListResult::page_token().
252+
///
253+
/// @return A Future that will be resolved with a ListResult containing
254+
/// items and prefixes for the specified page. For stubs, this will be an
255+
/// empty ListResult.
256+
Future<ListResult> List(const char* page_token);
257+
258+
/// @brief Lists the first page of items (files) and prefixes (directories)
259+
/// under this StorageReference.
260+
///
261+
/// This is an overload of List() that omits the page_token, effectively
262+
/// requesting the first page of results.
263+
///
264+
/// @return A Future that will be resolved with a ListResult. For stubs,
265+
/// this will be an empty ListResult.
266+
Future<ListResult> List();
267+
230268
/// @brief Returns the short name of this object.
231269
///
232270
/// @returns the short name of this object.

0 commit comments

Comments
 (0)