Opened 12 months ago

Last modified 12 months ago

#117 new enhancement

Let makedirs accept `exist_ok` as argument and fix default behavior

Reported by: ftputiluser Owned by: schwa
Priority: major Milestone:
Component: Library Version:
Keywords: Cc:

Description

thank you for this library.

to fit the pyhton os module it would be nice if makedirs could accept additional args.

Change History (2)

comment:1 Changed 12 months ago by schwa

Thank you for the report!

I agree, FTPHost.makedirs should accept the exist_ok argument, as os.makedirs does.

When looking at the code, I noticed that the current implementation doesn't accept an exist_ok argument, but behaves as if exist_ok=True was given. However, according to the documentation at https://docs.python.org/3/library/os.html#os.makedirs , exist_ok should be False by default.

I plan to change the behavior in a future ftputil 4.0.0, so that makedirs without exist_ok conforms to the Python documentation and the exist_ok argument is supported.

comment:2 Changed 12 months ago by schwa

Summary: let makedirs accept exist_ok=False as argumentLet makedirs accept `exist_ok` as argument and fix default behavior
Note: See TracTickets for help on using tickets.