Skip to content

Conversation

@nex3
Copy link
Contributor

@nex3 nex3 commented Apr 3, 2019

We only need to list the path's immediate parent directory in order to
find its real case.

Closes #636

@nex3 nex3 requested a review from srawlins April 3, 2019 20:56
We only need to list the path's immediate parent directory in order to
find its real case.

Closes #636
@nex3 nex3 force-pushed the list-dir-non-recursive branch from 2e79273 to 8b76bd2 Compare April 3, 2019 20:56
Copy link
Contributor

@srawlins srawlins left a comment

Choose a reason for hiding this comment

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

Good fix

Iterable<String> list(String parent) =>
_fs.readdirSync(parent).expand((child) {
var path = p.join(parent, child as String);
return dirExists(path) ? list(path) : [path];
Copy link
Contributor

Choose a reason for hiding this comment

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

nice local recursive function

@nex3 nex3 merged commit 59800ad into master Apr 4, 2019
@nex3 nex3 deleted the list-dir-non-recursive branch April 4, 2019 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants