-
Notifications
You must be signed in to change notification settings - Fork 90
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
Rename standard library functions #639
Conversation
f892187
to
4ae673e
Compare
45901b5
to
607c721
Compare
pub fun make_executable(path: Text): Bool { | ||
if file_exist(path) { | ||
trust $ chmod +x "{path}" $ | ||
pub fun file_chmod(path: Text, mode: Text): Bool { |
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.
Added mode
parameter because users are likely going to want to do more than just set the executable bit.
@@ -70,12 +70,13 @@ pub fun make_executable(path: Text): Bool { | |||
/// Changes the owner of a file. | |||
/// | |||
/// If the file doesn't exist, it returns `false` | |||
pub fun change_owner(user: Text, path: Text): Bool { | |||
if file_exist(path) or dir_exist(path) { | |||
pub fun file_chown(path: Text, user: Text): Bool { |
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.
Swapped path
and user
parameters because all other file functions have the filename as the first parameter.
Co-authored-by: Phoenix Himself <[email protected]>
We need to docuument those changes for 0.4.0 |
Rename standard library functions for internal consistency and transparency.
Rename test scripts to match, and prefix with
array_
etc where not already done.