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

Add support for other file types in rm #617

Closed
freitagbr opened this issue Dec 9, 2016 · 2 comments
Closed

Add support for other file types in rm #617

freitagbr opened this issue Dec 9, 2016 · 2 comments
Assignees
Labels

Comments

@freitagbr
Copy link
Contributor

rm is only able to delete files, directories, and symbolic links. fs.lstatSync is able to detect several other file types, however:

stats.isBlockDevice()
stats.isCharacterDevice()
stats.isFIFO()
stats.isSocket()

Support for these file types should be added (at least for the ones it makes sense to run rm on).

@freitagbr
Copy link
Contributor Author

Which of these does it make sense to implement rm for? I think it only makes sense for fifos.

@nfischer
Copy link
Member

It probably makes sense to remove fifos. If someone tries to rm the other devices, let's provide an error message (similar to when someone tries to rm a file they don't have permission for). If someone does need to rm these file types, they can easily file a bug for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants