nextcloud / nextcloud/android-library
More generic target file in DownloadRemoteFileOperation constructor
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 105
- Forks
- 99
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 21
Description
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,
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate DownloadRemoteFileOperation and inspect getTmpPath() plus the existing constructor. Add the requested File-based constructor while preserving the current constructor's behavior, then verify that callers can choose an arbitrary temporary file path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- api, mobile-dev
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100