Closed juancarlospaco closed 4 years ago
filename seems wrong, os.nim uses convention: file: a file name (can include dirSep) dir: a dir name filename: a file name without dirSep path: a file or dir
what about directories?
should this be named chmod(path: string, ...)
to cover both?
what about sticky bit (+ setuid, setgid)? this is probably out of scope for this PR since it'd require changing os.nim
for making it easier to port shell scripts to nim, I'd also like to have: chmod(path: string, perms: string)
, and in particular support: chmod("a1.txt", "u+x")
, which simplifies user code. This could be done in future work though
@timotheecour
Feel free to send pull request to add Sticky bits to os.nim
, then that feature can be added here too, I dont know how to do it.
@juancarlospaco I've merged this but can you please follow-up with a changelog.md entry?
filepermissions
with a convenience proc to save some typing.chmod "file.ext", 0o666
:)