Skip to content

Add cp and mv commands - #30

Open
isaacgravenor wants to merge 5 commits into
iProgramMC:masterfrom
isaacgravenor:master
Open

Add cp and mv commands#30
isaacgravenor wants to merge 5 commits into
iProgramMC:masterfrom
isaacgravenor:master

Conversation

@isaacgravenor

Copy link
Copy Markdown

This commit/PR adds 'cp' and 'mv', where 'mv' uses the same code as 'cp' but attempts to delete the file afterwards. Command-line fkags (such as -r ), or moving/copying folders isn't supported by this code (yet!).

This commit adds 'cp' and 'mv', where 'mv' uses the same code as 'cp' but attempts to delete the file afterwards.
Command-line fkags (such as -r ), or moving/copying folders isn't supported by this code (yet!).
Comment thread src/shell.c Outdated
Comment thread src/shell.c Outdated
Comment thread src/shell.c Outdated
Comment thread src/shell.c Outdated
Comment thread src/shell.c Outdated
Comment thread src/shell.c Outdated
Yet to do:
block reading,
FiRenameFile
Used movedata code for cp (and for the second attempt of mv, where it copies/deletes), reusing movedata_precision for cp and mv by defining it up top.
Comment thread src/shell.c Outdated
Comment thread src/shell.c
Comment thread src/shell.c Outdated
Comment thread src/shell.c Outdated
Comment thread src/shell.c Outdated
The code styles were all sorted out, and after having looked into other source files, size_t seems to be pointless here so int has been used instead, with casts removed where appropriate. Also, '||' has been added when checking filenames, as suggested.
@isaacgravenor

Copy link
Copy Markdown
Author

I believe all of the reviewed points have been addressed, save for the ShellCopy idea, as I commented on. Let me know what you think. 馃槃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants