-
Notifications
You must be signed in to change notification settings - Fork 191
feat: creating and removing empty directories #1011
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
base: master
Are you sure you want to change the base?
Conversation
Hey @wassup05. Thanks for the PR. Great work!
|
!! | ||
!! ### Description | ||
!! This function makes an empty directory according to the path provided. | ||
!! Relative paths as well as on Windows paths involving either `/` or `\` are accepted |
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.
Add period to end of sentence.
!! ### Description | ||
!! This function makes an empty directory according to the path provided. | ||
!! Relative paths as well as on Windows paths involving either `/` or `\` are accepted | ||
!! appropriate error message is returned whenever any error occur. |
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.
Capitalise "appropriate" to be consistent. (Same down below).
I think it's fine @sebastian-mutz, doing that would kind of clutter the example I feel, and this is how it's been handled in some other examples as well like here and here |
Makes sense. Then it's best to keep it consistent. |
User facing functions added are
make_directory (path, mode, err)
(mode
argument only for Unix systems)remove_directory (path, err)
/
or\
.CRT
functionsmkdir, rmdir
,_mkdir, _rmdir
on Unix and Windows respectively.strerror
has been included as a private helper to provide helpful error messages.state_type
is used for error handling.Side note:
make_directory
could have alogical
argumentrecursive
which would work likemkdir -p
but that would require path manipulation especiallydir_name
from #999Do let me know your thoughts.