Closed xavierBizoux closed 1 year ago
Yes it should only create the folders which doesn’t exist yet.
Xavier
From: Jon Walker @.> Sent: Thursday, May 11, 2023 7:59:58 PM To: sassoftware/python-sasctl @.> Cc: xavierBizoux @.>; Author @.> Subject: Re: [sassoftware/python-sasctl] Folders service (PR #164)
How is create_folder_recursive() intended to be used? If /foo exists and I call create_folder_recursive('/foo/bar/baz') should it create both "bar" and "baz" folders?
— Reply to this email directly, view it on GitHubhttps://github.com/sassoftware/python-sasctl/pull/164#issuecomment-1544447298, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABD6QFF2CQE5G2NJQVMCUELXFUSJ5ANCNFSM6AAAAAAX6DMU4Y. You are receiving this because you authored the thread.Message ID: @.***>
Ok, that makes sense, but as currently coded, it doesn't actually do that. The return
statement stops execution after the first folder is created, so create_folder_recursive('/foo/bar/baz')
will only create /foo/bar. Assuming it should create /foo/bar and then create & return /foo/bar/baz.
Also, how do you feel about renaming to create_path
?
Fine vu me for the new name.
Xavier
From: Jon Walker @.> Sent: Thursday, May 11, 2023 9:09:34 PM To: sassoftware/python-sasctl @.> Cc: xavierBizoux @.>; Author @.> Subject: Re: [sassoftware/python-sasctl] Folders service (PR #164)
Ok, that makes sense, but as currently coded, it doesn't actually do that. The return statement stops execution after the first folder is created, so create_folder_recursive('/foo/bar/baz') will only create /foo/bar. Assuming it should create /foo/bar and then create & return /foo/bar/baz.
Also, how do you feel about renaming to create_path?
— Reply to this email directly, view it on GitHubhttps://github.com/sassoftware/python-sasctl/pull/164#issuecomment-1544539100, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABD6QFBN2H4AFJGVVHQU4KDXFU2O5ANCNFSM6AAAAAAX6DMU4Y. You are receiving this because you authored the thread.Message ID: @.***>
Hi Jon,
I’ve updated the code to be recursive and with the new name create_path.
Could you please validate the code and accept the merge request?
Regards,
Xavier
From: Xavier Bizoux @.> Date: Thursday, 11 May 2023 at 21:13 To: sassoftware/python-sasctl @.>, sassoftware/python-sasctl @.> Cc: Author @.> Subject: Re: [sassoftware/python-sasctl] Folders service (PR #164) Fine vu me for the new name.
Xavier
From: Jon Walker @.> Sent: Thursday, May 11, 2023 9:09:34 PM To: sassoftware/python-sasctl @.> Cc: xavierBizoux @.>; Author @.> Subject: Re: [sassoftware/python-sasctl] Folders service (PR #164)
Ok, that makes sense, but as currently coded, it doesn't actually do that. The return statement stops execution after the first folder is created, so create_folder_recursive('/foo/bar/baz') will only create /foo/bar. Assuming it should create /foo/bar and then create & return /foo/bar/baz.
Also, how do you feel about renaming to create_path?
— Reply to this email directly, view it on GitHubhttps://github.com/sassoftware/python-sasctl/pull/164#issuecomment-1544539100, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABD6QFBN2H4AFJGVVHQU4KDXFU2O5ANCNFSM6AAAAAAX6DMU4Y. You are receiving this because you authored the thread.Message ID: @.***>
How is
create_folder_recursive()
intended to be used? If /foo exists and I callcreate_folder_recursive('/foo/bar/baz')
should it create both "bar" and "baz" folders?