itinance / itinance/react-native-fs
rmdir() should be used instead of unlink() for directories
Open
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
According to the documentation, unlink can remove directories.
However, based on standard Linux behavior, unlink should only be used to remove files, not directories.
When attempting to delete a directory, `rmdir()` should be used for empty directories, and `rm()` with the `{ recursive: true }` option should be used for non-empty directories.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.