nytimes / Fech

Deprecated. Please see https://github.com/dwillis/Fech for a maintained fork.
http://nytimes.github.io/Fech/
Other
114 stars 30 forks source link

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

Closed bycoffe closed 7 years ago

bycoffe commented 11 years ago

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:

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 commented 11 years ago

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