Closed saringer closed 6 years ago
Sounds good! Should be pretty simple.
Just open a PR when it's finished!
I noticed on the ROADMAP.md that there are a lot of overlap between directories and files. Should we only allow functions on directories to operate on directories and likewise for files?
For example, if I tried dir mv test
it would fail if test was a file and not a directory.
Yes, we should have seperate commands for directories and files regarding "repeating" commands such as mv
and del
, at least for now; if that's your question.
Yes shouldnt be to hard to implement. All I have to do is implement the appropriate method in the class "file.java". I will propose a solution in the upcoming week, as I had no time yet. For solving the issue I will use javas already existingrenameTo
method https://docs.oracle.com/javase/7/docs/api/java/io/File.html
Sounds good. And you can take as long as you need, really. Just make sure that the code in Files
on your machine is up to date with the dev
branch so there are no conflicts when trying to merge your code! 😀
Sorry, I don't think I phrased my question very well.
If we had a file example.txt
and someone ran dir rm example.txt
, should it remove the file or fail because it is not a directory?
Well first off, just so you know, it's only rm
now, the dir
thing has been removed.
But to answer your question, it should remove the file. Now that we have changed the command format it would be better to include the code for file and directory removal in the same function.
@saringer I regret to inform you that this feature has been added by @ojles. If you would like to help tackle something else, we have some other features that need to be completed. Please message me on Slack if you have any questions.
After taking a look at the roadmap I noticed that there are still a lot of issues open. As I'm very interested in this project I would like to contribute by adding an implementation for renaming files.