-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More generic target file in DownloadRemoteFileOperation constructor #161
Comments
@tobiasKaminsky what do you think, since you probably know more about the lib than I do? |
@gerritbeuze sorry for coming back this late. |
I hit the same issue. Is it acceptable to make this change non-backward compatible? I.e force the API user to provide full local path to the file (which will be created) instead of folder? Such change would make code simple: constructor would be |
It is possible to override |
The current state of this library/class is to only download the file and store it into a temp place. Especially for failing downloads, it is a good idea to have it downloaded first into a temp folder, or? |
Hi,
The DownloadRemoteFileOperation currently takes (String remotePath, String localFolderPath) as parameters. These are then concatenated in getTmpPath().
As a result the temp file directory structure matches the path in remotePath.
This is not very convenient if you want to download to a different directory structure (as I do).
If there were a new constructor (String remotePath, File tempFile) that would simply take the temp file as defined by the using client, it would be much more generic. The existing constructor can be expressed in this by using DownloadRemoteFileOperation(remotePath, new File(localFolderPath, remotePath));
I thik this would make the interface much more generic to use and would save me from copying the class for just this modification.
Thanks in advance,
The text was updated successfully, but these errors were encountered: