Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs.walk #192

Merged
merged 2 commits into from Feb 15, 2019

Conversation

4 participants
@hayd
Copy link
Contributor

hayd commented Feb 13, 2019

#189

  • tests passing (this is passing locally on osx for me)... I think failure is due to not sorting.
  • add docstrings
  • support symlinks (Perhaps add later?)
  • add docs/to README.
  • add async version (make this walk and walkSync)
fs/walk.ts Outdated
}


export function *walk(dir: string, options: WalkOptions = {}): IterableIterator<FileInfo> {

This comment has been minimized.

@ry

ry Feb 13, 2019

Contributor

jsdoc with example please

await mkdir(d + "/dir_empty");
},
function emptyDir() {
const arr = Array.from(walk("."), (f: FileInfo) => f.path);

This comment has been minimized.

@ry

ry Feb 13, 2019

Contributor

beautiful!

remove(d, {recursive: true});
}
}
test({ name, fn });

This comment has been minimized.

@ry

ry Feb 13, 2019

Contributor

I like this pattern of wrapping the test function for setup.

This comment has been minimized.

@hayd

hayd Feb 14, 2019

Author Contributor

Bert suggested this in discussion of setup/teardown for testFileserver - I should push a branch with that change too...

Show resolved Hide resolved fs/walk.ts

@hayd hayd force-pushed the hayd:walk branch from a1b88da to 274d964 Feb 13, 2019

@hayd

This comment has been minimized.

Copy link
Contributor Author

hayd commented Feb 13, 2019

Is symlink not supported in windows?

@hayd hayd force-pushed the hayd:walk branch from 484810f to 0aafeed Feb 14, 2019

@hayd

This comment has been minimized.

Copy link
Contributor Author

hayd commented Feb 14, 2019

@ry does this suffice for jsdoc?
(There's a lack of docs in all of std!)

This supports lots of options now, and has both async and sync versions.

@hayd hayd changed the title WIP fs.walk fs.walk Feb 14, 2019

@ry

ry approved these changes Feb 15, 2019

Copy link
Contributor

ry left a comment

@hayd Yes, thanks. LGTM

@ry ry merged commit 3be908f into denoland:master Feb 15, 2019

2 checks passed

denoland.deno_std #20190214.2 succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@hayd hayd referenced this pull request Feb 16, 2019

Open

Provide a test runner #193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.