dsherret / dax

Cross-platform shell tools for Deno and Node.js inspired by zx.
MIT License
967 stars 33 forks source link

renameToDir #156

Closed greentore closed 11 months ago

greentore commented 1 year ago

I think it would be handy to have a PathRef method for renaming (moving) files do directories, similar to copyFileToDir.

This:

ref.rename(dirRef.join(ref.basename()));

Could be written like this:

ref.renameToDir(dirRef);