nextcloud / nextcloud/android-library

More generic target file in DownloadRemoteFileOperation constructor

Open
#161 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

approved enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.