Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
<!-- First ensure you installed the latest version of fs-extra --> <!-- If your bug still exists please fill out the following information if it applies to your issue: --> <!-- Please check if you have installed a supported version of Node.js as written in "engines" in the package.json --> - **Operating System:** macOs 10.15.7 (latest Catalina) - **Node.js version:** v14.15.3 - **`fs-extra` version:** 9.0.1 First I'd like to thank you for `fs-extra` which is really great! I'm fighting with an error when trying to move files: "Source and destination must not be the same." I filtered the src and destination with `===` and they are NOT the same -> so why is `fs-extra` rejecting me? Digging deeper, they *look* the same. When comparing their normalized unicode representation, they are indeed the same. ~~**So I'm suspecting (but don't really know) that `fs-extra` is doing a unicode normalization before validating src vs dest.** (maybe `Object.checkPathsSync (xxx/node_modules/fs-extra/lib/util/stat.js:51:11)`~~ [EDIT] the file system is doing unicode normalization. ~~If true, I believe this is incorrect. There are discussions for ex. in https://news.ycombinator.com/item?id=13953800 that states that for ex. APFS is treating pathes are "bags of bytes" and intentionally not normalizing (cf. linked https://mjtsai.com/blog/2017/03/24/apfss-bag-of-bytes-filenames/)~~ ~~Hence I believe that fs-extra should not normalize. (not an expert, happy to be explained wrong)~~ ~~somehow related to https://github.com/jprichardson/node-fs-extra/issues/759~~
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by Offirmo and has received 8 comments.