react-native-fs icon indicating copy to clipboard operation
react-native-fs copied to clipboard

rmdir() should be used instead of unlink() for directories

Open mid2ly opened this issue 6 months ago • 0 comments

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.

mid2ly avatar Jul 04 '25 01:07 mid2ly