Conversation
Signed-off-by: Scott K Logan <logans@cottsay.net>
This change adds a simple function for listing the contents of a directory, and returning the names of those files as a string_array object. Signed-off-by: Scott K Logan <logans@cottsay.net>
93331f7 to
9837765
Compare
cottsay
commented
Jan 12, 2021
cottsay
commented
Jan 12, 2021
cottsay
commented
Jan 12, 2021
cottsay
commented
Jan 12, 2021
Signed-off-by: Scott K Logan <logans@cottsay.net>
cottsay
commented
Jan 12, 2021
Signed-off-by: Scott K Logan <logans@cottsay.net>
Signed-off-by: Scott K Logan <logans@cottsay.net>
cottsay
commented
Jan 12, 2021
Comment on lines
+516
to
518
| if (NULL != state->dir) { | ||
| closedir(state->dir); | ||
| } |
Member
Author
There was a problem hiding this comment.
TIL that closedir(NULL) causes some sort of abort on macOS, but not on Linux.
clalancette
reviewed
Jan 12, 2021
This reverts commit 9837765. Signed-off-by: Scott K Logan <logans@cottsay.net>
clalancette
approved these changes
Jan 13, 2021
Contributor
clalancette
left a comment
There was a problem hiding this comment.
This is a lot of really good work; I can't see much to complain about with it.
So looks good to me with green CI. Thanks for iterating!
fujitatomoya
approved these changes
Jan 15, 2021
Collaborator
fujitatomoya
left a comment
There was a problem hiding this comment.
i think it looks good with nitpick.
Collaborator
|
@Barry-Xu-2018 friendly ping, you might wanna take a look at this since we added |
Contributor
|
I have checked codes and LGTM. |
Signed-off-by: Scott K Logan <logans@cottsay.net> Co-authored-by: tomoya <Tomoya.Fujita@sony.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This API enables iteration of large directories. There are three parts here:
It's worth discussing the reason I created the
rcutils_dir_iter_state_tstruct instead of putting more stuff inrcutils_dir_iter_t. The biggest motivating factor there is that we needwindows.hfor those types, and I REALLY REALLY don't want that polluting our rcutils headers. Additionally, the idea behind this API is to hide the platform-specific data structures, so that stuff is essentially private data for the API.Closes #249