alpha0010 / react-native-file-access

Filesystem access for React Native
MIT License
307 stars 19 forks source link

Is there a way to unlink a directory? #21

Closed ahmetbicer closed 3 years ago

ahmetbicer commented 3 years ago

FileSystem.unlink method seems to only work for files. Is there a way to delete whole directory?

Thanks!

alpha0010 commented 3 years ago

Should already work on iOS. For Android, I believe it only works if the directory is empty (OS default behavior).

Will try to add Android support for non-empty directories soon.

ahmetbicer commented 3 years ago

Thank you so much! By the way this is the implementation in react-native-fs, looks like they recursively deleting the directory content, maybe it can be helpful.