Skip to content

Conversation

@imaqtkatt
Copy link

Despite the branch name it implements 3 new functions related to the removal of files or directories and the creation of directories

@imaqtkatt imaqtkatt self-assigned this Aug 28, 2024
@developedby
Copy link
Member

Implements both #418 and #420

src/run.cu Outdated
int result = mkdir(name.buf, mode);
free(name.buf);

if (result) {
Copy link
Contributor

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
Comment on lines 968 to 969
book->ffns_buf[book->ffns_len++] = (FFn){"DELETE_FILE", io_delete_file};
book->ffns_buf[book->ffns_len++] = (FFn){"DELETE_DIRECTORY", io_delete_directory};
Copy link
Member

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

@developedby
Copy link
Member

I've also added some comments on the specs for this issue, I think we need to change the interfaces a little

@imaqtkatt imaqtkatt changed the title Implement delete_file, delete_directory and mkdir Implement remove, remove_all and mkdir Sep 3, 2024
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.

3 participants