catchpoint / WebPageTest.agent

Cross-platform WebPageTest agent
Other
213 stars 138 forks source link

Adding dir and file removing to os_util #540

Closed sammeboy635 closed 2 years ago

sammeboy635 commented 2 years ago

Looking through the wptagent code base there are multiple locations that remove files and directory, which,

At some point I will create a PR to change these areas out with these os_util functions. If you agree, with it.

tkadlec commented 2 years ago

@sammeboy635 This looks great. Agree with @pmeenan on this:

Small nit, might be worth an optional param to not log on failure in case the caller is expecting that a file or directory may not exist.

Can you make that change and then I'll merge.

sammeboy635 commented 2 years ago

@sammeboy635 This looks great. Agree with @pmeenan on this:

Small nit, might be worth an optional param to not log on failure in case the caller is expecting that a file or directory may not exist.

Can you make that change and then I'll merge.

I took out the logging.exception for now because this is a good point. Thanks