Skip to content

feat: implement MoveFile and CopyItem across all providers (stub audit follow-up)Β #5

Description

@brunolnetto

Background

An audit of the CloudFS codebase identified several unimplemented or stub operations across the 6 cloud storage providers. This issue tracks each gap and links to the implementing PR.

Audit Results

πŸ”΄ P0 β€” Critical Blockers

# Feature File Status
1 MoveFile() cloud_filesystem.cpp:446 🟑 In Progress (this branch)
2 Google Drive JWT RS256 Signing gdrive_auth.cpp:120 βœ… Fixed in PR #4

🟠 P1 β€” Important

# Feature Providers Missing Status
3 CopyItem() OneDrive ❌, SFTP ❌ 🟑 In Progress (OneDrive added this branch)
4 ListFolderRecursive() native API GDrive, OneDrive, SharePoint, SFTP, VFS ⏳ Pending

🟒 P2 β€” Nice-to-have

# Feature Providers Missing Status
5 RefreshDownloadUrl() GDrive ❌, SFTP ❌ ⏳ Pending
6 AbortUpload() All providers ⏳ Pending

Provider Coverage Matrix (After This PR)

                    GDrive  Dropbox  OneDrive  SharePoint  SFTP   VFS
MoveFile()           βœ…       βœ…        βœ…         βœ…         βœ…     βœ…
CopyItem()           βœ…       βœ…        βœ…         βœ…         ❌     ❌
ListFolderRecursive  πŸ“Š       βœ…        πŸ“Š         πŸ“Š         πŸ“Š    πŸ“Š
RefreshDownloadUrl   ❌       βœ…        βœ…         βœ…         ❌     ❌
AbortUpload          ❌       ❌        ❌         ❌         ❌     ❌

βœ… = Implemented | ❌ = Not implemented | πŸ“Š = Software fallback (suboptimal)


Implementation Approach for MoveFile

Each provider uses its native move/rename API:

  • SharePoint/OneDrive: PATCH /drives/{root}/items/{id} with parentReference + name
  • Google Drive: GET /files/{id}?fields=parents then PATCH with addParents/removeParents
  • Dropbox: POST /files/move_v2
  • SFTP: libssh2_sftp_rename_ex() with OVERWRITE|ATOMIC|NATIVE flags
  • VFS Agent: POST /v1/move (requires agent-side endpoint)

Acceptance Criteria

  • MoveFile(src, dst) works for same-root moves on all 5 cloud providers
  • CopyItem() works for OneDrive
  • Cross-provider and cross-root moves return a clear error
  • All existing tests pass (no regressions)
  • Build: 0 errors, 0 warnings

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions