ToBeReplaced / nio.file

Clojure wrapper for java.nio.file
Eclipse Public License 1.0
9 stars 2 forks source link

Functionality for deleting and copying directories #4

Open egli opened 9 years ago

egli commented 9 years ago

I'm trying to migrate my code from me.raynes.fs away to this library. First off because it seems to be better maintained but also because it is based on modern Java APIs. The last functionality that has no equivalent in nio.file are the functions delete-dir and copy-dir. I understand that you do not want this to be a utility library. This however will foster a copy and paste culture based of your walkthrough.clj. I have already implemented a delete-dir based on your example and some inspiration from the ant delete task so that it would work for nfs mounted directories. I will have to implement a tree walker for copying.

For now, I guess, we can put this code in walkthrough.clj (expect some pull requests) but I think in the long run this should be included maybe in a separate namespace.

ToBeReplaced commented 9 years ago

I hear what you are saying re: copy-paste culture. There is definitely room for a utility library to cover the most common use cases in a way that will usually work. I believe this utility library should be developed separately so this project can stay tight, clean, and reliable.

Your example has two parts that show why I'm so hesitant on including utilities. You have edge-case handling on NFS mounts that is undesirable if I know my directory should not have that problem, and you require clojure.tools.logging.

If you do make headway on a utility library, please let me know, and thanks for trialing this library.