bcpeinhardt / simplifile

Simple file operations for Gleam that work on all targets (Erlang/Node/Deno)
71 stars 10 forks source link

Recursively make directory #6

Closed lpil closed 1 year ago

lpil commented 1 year ago

Hello!

It would be handy to have a function which will create a directory and any parent directories that need to be created.

Cheers, Louis

bcpeinhardt commented 1 year ago

This function exists now and is called create_dir_all.

lpil commented 1 year ago

Thank you

lpil commented 1 year ago

We now have "dir" and "directory". Should we pick one to be consistent?

bcpeinhardt commented 1 year ago

Ehhh probably? Rust std::fs went with create_dir and create_dir_all, so maybe we should too. It'll be the second time in two days I've changed the function name for consistency haha (it was make_directory but I didn't want to have a function called make_file so I swapped make for create).

bcpeinhardt commented 1 year ago

Yeah I have some docs updates to make too, I think I'm gonna make this change.

lpil commented 1 year ago

Personally I would probably go for directory as core libraries don't use abbreviations anywhere, for clarity, but both seem fine.

bcpeinhardt commented 1 year ago

This is done now :)