-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement remove, remove_all and mkdir #426
base: main
Are you sure you want to change the base?
Conversation
src/run.cu
Outdated
int result = mkdir(name.buf, mode); | ||
free(name.buf); | ||
|
||
if (result) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep the var names the same? In the C runtime you called this status
.
src/run.cu
Outdated
book->ffns_buf[book->ffns_len++] = (FFn){"DELETE_FILE", io_delete_file}; | ||
book->ffns_buf[book->ffns_len++] = (FFn){"DELETE_DIRECTORY", io_delete_directory}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following the convention of using the C/unix name for these functions, it would be better to call them "RM" and "RMDIR".
Also, if we're using "rmdir" we definitely should not also use "delete_directory", either go with one style or the other.
HVM in general prefers short names
I've also added some comments on the specs for this issue, I think we need to change the interfaces a little |
Despite the branch name it implements 3 new functions related to the removal of files or directories and the creation of directories