Skip to content
This repository has been archived by the owner on Mar 6, 2019. It is now read-only.

Add a way to download a filing only if it hasn't already been downloaded #58

Closed
bycoffe opened this issue Aug 23, 2013 · 1 comment
Closed

Comments

@bycoffe
Copy link
Contributor

bycoffe commented Aug 23, 2013

I think something like this has come up before -- whether Filing#download should re-download a filing if the file already exists.

While I still think it should assume the user wants to re-download the file when Filing#download is called, what if we added either:

  • A parameter to Filing#download that told it to download the filing only if the file doesn't already exist.
  • A new method on Filing (maybe Filing#download_if_needed) that would download the filing only if the file doesn't already exist.

I frequently use the pattern:

filing.download unless File.exists?(filing.file_path)

but making that check easier would be helpful in a lot of situations.

@dwillis
Copy link
Contributor

dwillis commented Aug 23, 2013

I would go for adding an optional param to Filing#download.

@bycoffe bycoffe closed this as completed Jun 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants