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

API Clarification #96

Closed
dakanji opened this issue Jan 3, 2016 · 8 comments
Closed

API Clarification #96

dakanji opened this issue Jan 3, 2016 · 8 comments

Comments

@dakanji
Copy link

dakanji commented Jan 3, 2016

Can you please clarify in the ReadMe how the "unlink, chmod, stat, lstat, rmdir, readdir unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync” options should be passed to the API?

Would that be something like ...

rimraf(f, {rmdir: true}, callback)
@datnordstrom
Copy link

+1

1 similar comment
@maka-io
Copy link

maka-io commented Mar 31, 2016

+1

@isaacs
Copy link
Owner

isaacs commented Mar 31, 2016

You pass in functions that are used instead of the default fs methods.

rimraf(f, { rmdir: myCustomDirRemovalFunction }, callback)

@pixelass
Copy link

pixelass commented May 21, 2017

+1.
This project really deserves a better readme/API description.
Right now the lack is keeping me from using it because I don't want to have to pick around in the source code to understand how it works.

@isaacs
Copy link
Owner

isaacs commented May 21, 2017

@pixelass Doc patch welcome. It's really pretty simple, though. rimraf(someFileOrFolder, callbackFunctionToCallWhenItsDone). The function you pass in gets called when the recursive removal has completed. The sync version is the same, but no callback rimraf.sync(someFileOrFolder).

The options object is only for edge cases you probably don't need to ever worry about. If you do, they're documented pretty explicitly.

@isaacs isaacs closed this as completed May 21, 2017
@pixelass
Copy link

@isaacs I'll see what I can do. I can add some basic documentation but will most likely need help on the validity.

@isaacs
Copy link
Owner

isaacs commented May 22, 2017

@pixelass I'm happy to review any doc PR you send over. It's easier to tell you what's wrong than write it myself :)

@jantimon
Copy link

jantimon commented Jun 7, 2017

@pixelass impressive docs 👍

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

No branches or pull requests

6 participants